From fe25cb9c54be2b7c47150d40aa094f7af286d49d Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Thu, 3 May 2018 08:51:08 +0100 Subject: [PATCH] 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. --- backend/drive/drive.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/drive/drive.go b/backend/drive/drive.go index 14b24da27..b98bde6c0 100644 --- a/backend/drive/drive.go +++ b/backend/drive/drive.go @@ -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) {