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

box: Calculate Free amount in About call

Nick Craig-Woodc08617c70f97
diff --git a/backend/box/box.go b/backend/box/box.go
index b98c913ea..a4383fea8 100644
--- a/backend/box/box.go
+++ b/backend/box/box.go
@@ -900,8 +900,9 @@ func (f *Fs) About(ctx context.Context) (usage *fs.Usage, err error) {
}
// FIXME max upload size would be useful to use in Update
usage = &fs.Usage{
- Used: fs.NewUsageValue(user.SpaceUsed), // bytes in use
- Total: fs.NewUsageValue(user.SpaceAmount), // bytes total
+ Used: fs.NewUsageValue(user.SpaceUsed), // bytes in use
+ Total: fs.NewUsageValue(user.SpaceAmount), // bytes total
+ Free: fs.NewUsageValue(user.SpaceAmount - user.SpaceUsed), // bytes free
}
return usage, nil
}