From 922c85149444b92484f38a7673cbc3b282873814 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 2 Jul 2018 14:16:12 +0200 Subject: [PATCH] fix double slash in search result path when the result is in a submount Signed-off-by: Robin Appelman --- lib/private/Files/Node/Folder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/private/Files/Node/Folder.php b/lib/private/Files/Node/Folder.php index 95ceeee369..0eb119eb0d 100644 --- a/lib/private/Files/Node/Folder.php +++ b/lib/private/Files/Node/Folder.php @@ -258,7 +258,7 @@ class Folder extends Node implements \OCP\Files\Folder { if ($storage) { $cache = $storage->getCache(''); - $relativeMountPoint = substr($mount->getMountPoint(), $rootLength); + $relativeMountPoint = ltrim(substr($mount->getMountPoint(), $rootLength), '/'); $results = call_user_func_array(array($cache, $method), $args); foreach ($results as $result) { $result['internalPath'] = $result['path'];