summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2022-08-29 17:33:43 +0200
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>2022-08-30 10:24:30 +0000
commitee8cabe2cecf32c5f5e638a1cec1ce65c9bcee7e (patch)
tree62bec634d61c13978b5ad0dee26569eaf8d46d95 /lib/private
parentec9a9e571375a6daefce1e72e33b751fbd6b18cc (diff)
downloadnextcloud-server-ee8cabe2cecf32c5f5e638a1cec1ce65c9bcee7e.tar.gz
nextcloud-server-ee8cabe2cecf32c5f5e638a1cec1ce65c9bcee7e.zip
remove leading slash for search results at mountpoint root
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private')
-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 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);
}