mirror of
https://github.com/rclone/rclone
synced 2025-03-02 01:13:05 +01:00
box: Calculate Free amount in About call
This commit is contained in:
parent
1bd3365868
commit
c08617c70f
@ -902,6 +902,7 @@ func (f *Fs) About(ctx context.Context) (usage *fs.Usage, err error) {
|
|||||||
usage = &fs.Usage{
|
usage = &fs.Usage{
|
||||||
Used: fs.NewUsageValue(user.SpaceUsed), // bytes in use
|
Used: fs.NewUsageValue(user.SpaceUsed), // bytes in use
|
||||||
Total: fs.NewUsageValue(user.SpaceAmount), // bytes total
|
Total: fs.NewUsageValue(user.SpaceAmount), // bytes total
|
||||||
|
Free: fs.NewUsageValue(user.SpaceAmount - user.SpaceUsed), // bytes free
|
||||||
}
|
}
|
||||||
return usage, nil
|
return usage, nil
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user