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

vfs: with --vfs-used-is-size value is calculated and then thrown away - fixes #8220

Ilias Ozgur Can Leonard2446c4928df9
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 {