summaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Node/Folder.php
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2022-08-29 17:33:43 +0200
committerRobin Appelman <robin@icewind.nl>2022-08-29 17:33:43 +0200
commite9ba58ca61819048b4bf48086fc735c8ff092b85 (patch)
tree5ba7d5a0943caa1e97b48c400cf0e0982cd34ca7 /lib/private/Files/Node/Folder.php
parentd7deeb4e02121e2b4f07b4b02c9c6fc7fd70b137 (diff)
downloadnextcloud-server-e9ba58ca61819048b4bf48086fc735c8ff092b85.tar.gz
nextcloud-server-e9ba58ca61819048b4bf48086fc735c8ff092b85.zip
remove leading slash for search results at mountpoint root
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private/Files/Node/Folder.php')
-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 81ca7e254d9..fb3c78bb801 100644
--- a/lib/private/Files/Node/Folder.php
+++ b/lib/private/Files/Node/Folder.php
@@ -298,7 +298,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);
}