diff options
author | Robin Appelman <robin@icewind.nl> | 2020-03-27 17:04:53 +0100 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2020-03-27 17:04:53 +0100 |
commit | ef7bb5225a78069eccbb97e8eba868f0215344ed (patch) | |
tree | 5ca24582f7350dee16d289a9c894ece003eff6df /apps/files_external | |
parent | c235a40c94792ca5f921b4b7b29d17f679c4a497 (diff) | |
download | nextcloud-server-ef7bb5225a78069eccbb97e8eba868f0215344ed.tar.gz nextcloud-server-ef7bb5225a78069eccbb97e8eba868f0215344ed.zip |
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 <robin@icewind.nl>
Diffstat (limited to 'apps/files_external')
-rw-r--r-- | apps/files_external/lib/Lib/Storage/SMB.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files_external/lib/Lib/Storage/SMB.php b/apps/files_external/lib/Lib/Storage/SMB.php index 6cf7bb7db85..de9f41ac672 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; |