diff --git a/vfs/vfs.go b/vfs/vfs.go index 9f0fc1f14..40d48b5b1 100644 --- a/vfs/vfs.go +++ b/vfs/vfs.go @@ -626,6 +626,10 @@ func (vfs *VFS) Statfs() (total, used, free int64) { return nil }) vfs.usage.Used = &usedBySizeAlgorithm + // if we read a Total size then we should calculate Free from it + if vfs.usage.Total != nil { + vfs.usage.Free = nil + } } vfs.usageTime = time.Now() if err != nil {