mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 16:34:30 +01:00
smb: fix "Statfs failed: bucket or container name is needed" when mounting
Before this change, if you mounted the root of the smb then it would give an error on rclone about and periodically in the mount logs: Statfs failed: bucket or container name is needed in remote This fix makes the smb backend return empty usage in this case which will stop the errors and show the default 1P of free space. See: https://forum.rclone.org/t/error-statfs-failed-bucket-or-container-name-is-needed-in-remote/39631
This commit is contained in:
parent
e294b76121
commit
473d443874
@ -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) {
|
func (f *Fs) About(ctx context.Context) (_ *fs.Usage, err error) {
|
||||||
share, dir := f.split("/")
|
share, dir := f.split("/")
|
||||||
if share == "" {
|
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)
|
dir = f.toSambaPath(dir)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user