Skip to content

Commit

Permalink
Merge pull request #46721 from nextcloud/backport/46694/stable29
Browse files Browse the repository at this point in the history
[stable29] fix: FileInfo from `View` should have the correct name of a mountpoint
  • Loading branch information
susnux authored Jul 24, 2024
2 parents 09eb307 + 824803d commit 529a9bd
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 @@ -1392,6 +1392,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 529a9bd

Please sign in to comment.