Skip to content

Commit e76bb27

Browse files
authored
Merge pull request #33749 from nextcloud/backport/33734/stable24
[stable24] remove leading slash for search results at mountpoint root
2 parents 482671e + ee8cabe commit e76bb27

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/private/Files/Node/Folder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ public function search($query) {
296296

297297
private function cacheEntryToFileInfo(IMountPoint $mount, string $appendRoot, ICacheEntry $cacheEntry): FileInfo {
298298
$cacheEntry['internalPath'] = $cacheEntry['path'];
299-
$cacheEntry['path'] = $appendRoot . $cacheEntry->getPath();
299+
$cacheEntry['path'] = rtrim($appendRoot . $cacheEntry->getPath(), '/');
300300
$subPath = $cacheEntry['path'] !== '' ? '/' . $cacheEntry['path'] : '';
301301
return new \OC\Files\FileInfo($this->path . $subPath, $mount->getStorage(), $cacheEntry['internalPath'], $cacheEntry, $mount);
302302
}

0 commit comments

Comments
 (0)