]> source.dussan.org Git - nextcloud-server.git/commitdiff
remove leading slash for search results at mountpoint root 33750/head
authorRobin Appelman <robin@icewind.nl>
Mon, 29 Aug 2022 15:33:43 +0000 (17:33 +0200)
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>
Tue, 30 Aug 2022 10:28:02 +0000 (10:28 +0000)
Signed-off-by: Robin Appelman <robin@icewind.nl>
lib/private/Files/Node/Folder.php

index 400fd6bedcc8b0747f37cd28eaccfbd9c864d57b..7c4ddf569907407f97e1f2dc005d0854df436534 100644 (file)
@@ -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);
        }