aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2024-07-24 20:42:41 +0200
committerGitHub <noreply@github.com>2024-07-24 20:42:41 +0200
commitb305be43ca0bc92e782897612cf307b07a474e7c (patch)
treea27c4832f5cbbf2adbf1bbf2c04fe91194fdba3b
parent06fb25b6a2220b6b2402e16c034c0f83e5c980ee (diff)
parent1f1d62521260b5d339bdff88889ee05484782262 (diff)
downloadnextcloud-server-b305be43ca0bc92e782897612cf307b07a474e7c.tar.gz
nextcloud-server-b305be43ca0bc92e782897612cf307b07a474e7c.zip
Merge pull request #46720 from nextcloud/backport/46694/stable28
[stable28] fix: FileInfo from `View` should have the correct name of a mountpoint
-rw-r--r--lib/private/Files/View.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php
index 1fa14501047..890dcfe20e1 100644
--- a/lib/private/Files/View.php
+++ b/lib/private/Files/View.php
@@ -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) {