Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorblizzz <blizzz@arthur-schiwon.de>2022-09-28 11:37:11 +0300
committerGitHub <noreply@github.com>2022-09-28 11:37:11 +0300
commit0ba3d38c8c57216ca452859bfa23d5977ce131b2 (patch)
tree52221f217e11bb2ebf8757b14e82abec247d4307
parente04e2dc5bead31e913e9dbb5478f3634c381436a (diff)
parentd414008b1371ad4e6136a9496c3aa9f3ec61dcdb (diff)
Merge pull request #33750 from nextcloud/backport/33734/stable23
[stable23] remove leading slash for search results at mountpoint root
-rw-r--r--lib/private/Files/Node/Folder.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Files/Node/Folder.php b/lib/private/Files/Node/Folder.php
index 48bc1c60b21..51b2b7c5c9b 100644
--- a/lib/private/Files/Node/Folder.php
+++ b/lib/private/Files/Node/Folder.php
@@ -305,7 +305,7 @@ class Folder extends Node implements \OCP\Files\Folder {
private function cacheEntryToFileInfo(IMountPoint $mount, string $appendRoot, ICacheEntry $cacheEntry): FileInfo {
$cacheEntry['internalPath'] = $cacheEntry['path'];
- $cacheEntry['path'] = $appendRoot . $cacheEntry->getPath();
+ $cacheEntry['path'] = rtrim($appendRoot . $cacheEntry->getPath(), '/');
$subPath = $cacheEntry['path'] !== '' ? '/' . $cacheEntry['path'] : '';
return new \OC\Files\FileInfo($this->path . $subPath, $mount->getStorage(), $cacheEntry['internalPath'], $cacheEntry, $mount);
}