Merge pull request #46720 from nextcloud/backport/46694/stable28

[stable28] fix: FileInfo from `View` should have the correct name of a mountpoint
This commit is contained in:
Ferdinand Thiessen 2024-07-24 20:42:41 +02:00 committed by GitHub
commit b305be43ca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1388,6 +1388,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) {