Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

smb: fix "Statfs failed: bucket or container name is needed" when mounting

Nick Craig-Wood473d443874ef
diff --git a/backend/smb/smb.go b/backend/smb/smb.go
index b4e953354..6f1640cf4 100644
--- a/backend/smb/smb.go
+++ b/backend/smb/smb.go
@@ -451,7 +451,8 @@ func (f *Fs) List(ctx context.Context, dir string) (entries fs.DirEntries, err e
func (f *Fs) About(ctx context.Context) (_ *fs.Usage, err error) {
share, dir := f.split("/")
if share == "" {
- return nil, fs.ErrorListBucketRequired
+ // Just return empty info rather than an error if called on the root
+ return &fs.Usage{}, nil
}
dir = f.toSambaPath(dir)