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>
pull/20208/head
Robin Appelman 5 years ago
parent c235a40c94
commit ef7bb5225a
No known key found for this signature in database
GPG Key ID: 42B69D8A64526EFB
  1. 2
      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;

Loading…
Cancel
Save