1
mirror of https://github.com/rclone/rclone synced 2024-11-30 09:10:05 +01:00

drive: fix about (and df on a mount) for team drives - fixes #2288

Before this fix team drives would return the drive quota which is
incorrect and mis-leading.

Team drives don't appear to have an API for reading the bytes used or
the quota so we now return that the quota and usage are unknown.
This commit is contained in:
Nick Craig-Wood 2018-05-03 08:51:08 +01:00
parent f2608e2a64
commit fe25cb9c54

View File

@ -1057,6 +1057,10 @@ func (f *Fs) CleanUp() error {
// About gets quota information // About gets quota information
func (f *Fs) About() (*fs.Usage, error) { func (f *Fs) About() (*fs.Usage, error) {
if f.isTeamDrive {
// Teamdrives don't appear to have a usage API so just return empty
return &fs.Usage{}, nil
}
var about *drive.About var about *drive.About
var err error var err error
err = f.pacer.Call(func() (bool, error) { err = f.pacer.Call(func() (bool, error) {