diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php index 419b91b7b6d..7ba29b610fe 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -1392,6 +1392,10 @@ class View { 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) {