From 824803dd7be11a7ab5cd45f318309ca449d021fc Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Mon, 22 Jul 2024 22:01:12 +0200 Subject: [PATCH] fix: FileInfo from `View` should have the correct name of a mountpoint If a mountpoint is returned from a `View` the name must match the view scoped name and not the global name. For example group folders have a name like `1` or `2` (the ID), but the name of the FileInfo returned fro mthe View should be the mount point name, like `First groupfolder` or similar. Signed-off-by: Ferdinand Thiessen --- lib/private/Files/View.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php index 419b91b7b6d9a..7ba29b610fee4 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -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) {