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
1 changed files with 4 additions and 0 deletions

View File

@ -1057,6 +1057,10 @@ func (f *Fs) CleanUp() error {
// About gets quota information
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 err error
err = f.pacer.Call(func() (bool, error) {