From: Robin Appelman Date: Mon, 29 Aug 2022 15:33:43 +0000 (+0200) Subject: remove leading slash for search results at mountpoint root X-Git-Tag: v24.0.5rc1~2^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ee8cabe2cecf32c5f5e638a1cec1ce65c9bcee7e;p=nextcloud-server.git remove leading slash for search results at mountpoint root Signed-off-by: Robin Appelman --- diff --git a/lib/private/Files/Node/Folder.php b/lib/private/Files/Node/Folder.php index 9c15f0edf41..61b4a39c507 100644 --- a/lib/private/Files/Node/Folder.php +++ b/lib/private/Files/Node/Folder.php @@ -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); }