Skip to content

Commit

Permalink
Merge pull request #46694 from nextcloud/fix/file-info-name
Browse files Browse the repository at this point in the history
fix: FileInfo from `View` should have the correct name of a mountpoint
  • Loading branch information
sorbaugh authored Jul 24, 2024
2 parents b839483 + 12796c3 commit 52fe7b1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/private/Files/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -1357,6 +1357,10 @@ public function getFileInfo($path, $includeMountPoints = true) {
if ($mount instanceof MoveableMount && $internalPath === '') {
$data['permissions'] |= \OCP\Constants::PERMISSION_DELETE;
}
if ($internalPath === '' && $data['name']) {
$data['name'] = basename($path);
}

$ownerId = $storage->getOwner($internalPath);
$owner = null;
if ($ownerId !== null && $ownerId !== false) {
Expand Down

0 comments on commit 52fe7b1

Please sign in to comment.