diff options
Diffstat (limited to 'drive/sync_download.go')
| -rw-r--r-- | drive/sync_download.go | 9 | 
1 files changed, 5 insertions, 4 deletions
| diff --git a/drive/sync_download.go b/drive/sync_download.go index 58cd49c..9a88b61 100644 --- a/drive/sync_download.go +++ b/drive/sync_download.go @@ -3,13 +3,14 @@ package drive  import (  	"bytes"  	"fmt" -	"google.golang.org/api/drive/v3" -	"google.golang.org/api/googleapi"  	"io"  	"os"  	"path/filepath"  	"sort"  	"time" + +	"google.golang.org/api/drive/v3" +	"google.golang.org/api/googleapi"  )  type DownloadSyncArgs struct { @@ -85,7 +86,7 @@ func (self *Drive) DownloadSync(args DownloadSyncArgs) error {  func (self *Drive) getSyncRoot(rootId string) (*drive.File, error) {  	fields := []googleapi.Field{"id", "name", "mimeType", "appProperties"} -	f, err := self.service.Files.Get(rootId).Fields(fields...).Do() +	f, err := self.service.Files.Get(rootId).SupportsAllDrives(true).Fields(fields...).Do()  	if err != nil {  		return nil, fmt.Errorf("Failed to find root dir: %s", err)  	} @@ -191,7 +192,7 @@ func (self *Drive) downloadRemoteFile(id, fpath string, args DownloadSyncArgs, t  	// Get timeout reader wrapper and context  	timeoutReaderWrapper, ctx := getTimeoutReaderWrapperContext(args.Timeout) -	res, err := self.service.Files.Get(id).Context(ctx).Download() +	res, err := self.service.Files.Get(id).SupportsAllDrives(true).Context(ctx).Download()  	if err != nil {  		if isBackendOrRateLimitError(err) && try < MaxErrorRetries {  			exponentialBackoffSleep(try) | 
