]> source.dussan.org Git - nextcloud-server.git/commitdiff
remove leading slash for search results at mountpoint root 33749/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:24:30 +0000 (10:24 +0000)
Signed-off-by: Robin Appelman <robin@icewind.nl>
lib/private/Files/Node/Folder.php

index 9c15f0edf416f7bee54dfa9dc424602657176694..61b4a39c507eff340b27815ad42b6f2a23ba6405 100644 (file)
@@ -296,7 +296,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);
        }