From ef7bb5225a78069eccbb97e8eba868f0215344ed Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 27 Mar 2020 17:04:53 +0100 Subject: [PATCH] normalize smb path while listing folder contents currently when listing `'/'`, it will include a double slash in the paths used for the listing logic this causes unneeeded cache misses in the statCache Signed-off-by: Robin Appelman --- apps/files_external/lib/Lib/Storage/SMB.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/files_external/lib/Lib/Storage/SMB.php b/apps/files_external/lib/Lib/Storage/SMB.php index 6cf7bb7db8..de9f41ac67 100644 --- a/apps/files_external/lib/Lib/Storage/SMB.php +++ b/apps/files_external/lib/Lib/Storage/SMB.php @@ -207,7 +207,7 @@ class SMB extends Common implements INotifyStorage { */ protected function getFolderContents($path) { try { - $path = $this->buildPath($path); + $path = ltrim($this->buildPath($path), '/'); $files = $this->share->dir($path); foreach ($files as $file) { $this->statCache[$path . '/' . $file->getName()] = $file;