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>
This commit is contained in:
Robin Appelman 2020-03-27 17:04:53 +01:00
parent c235a40c94
commit ef7bb5225a
No known key found for this signature in database
GPG Key ID: 42B69D8A64526EFB
1 changed files with 1 additions and 1 deletions

View File

@ -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;