From 61e4b4db429a175e9e4437c93127929aa9373269 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Thu, 25 Jun 2020 18:09:52 +0100 Subject: [PATCH] drive: Allow the use of --drive-impersonate with the root_folder_id "appDataFolder" In this commit 5c5ad6220 drive: fix --drive-impersonate with cached root_folder_id We disabled the use of root_folder_id with --drive-impersonate to fix a problem with a cached root_folder_id giving the wrong results. This, alas, broke one users setup with a root_folder_id of appDataFolder. Since this is identifiable and definitely couldn't have been cached, we can safely skip this check in this case. See: https://forum.rclone.org/t/rclone-gdrive-no-longer-returning-anything/17215/10 --- backend/drive/drive.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/drive/drive.go b/backend/drive/drive.go index 2a55f6f18..b02145324 100755 --- a/backend/drive/drive.go +++ b/backend/drive/drive.go @@ -1127,7 +1127,7 @@ func NewFs(name, path string, m configmap.Mapper) (fs.Fs, error) { // using impersonate which they shouldn't have done. It is possible // someone is using impersonate and root_folder_id in which case this // breaks their workflow. There isn't an easy way around that. - if opt.RootFolderID != "" && opt.Impersonate != "" { + if opt.RootFolderID != "" && opt.RootFolderID != "appDataFolder" && opt.Impersonate != "" { fs.Logf(f, "Ignoring cached root_folder_id when using --drive-impersonate") opt.RootFolderID = "" }