mirror of
https://github.com/rclone/rclone.git
synced 2025-01-25 15:49:33 +01:00
drive: fix --drive-root-folder-id with team/shared drives
Before this change rclone used the team_drive ID as the root if set
even if the root_folder_id was set too.
This change uses the root_folder_id in preference over the team_drive
which restores the functionality.
This problem was introduced by ba7c2ac443
Fixes #3742
This commit is contained in:
parent
b5bb4c2a21
commit
19229b1215
@ -1021,11 +1021,11 @@ func NewFs(name, path string, m configmap.Mapper) (fs.Fs, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// set root folder for a team drive or query the user root folder
|
// set root folder for a team drive or query the user root folder
|
||||||
if f.isTeamDrive {
|
if opt.RootFolderID != "" {
|
||||||
f.rootFolderID = f.opt.TeamDriveID
|
|
||||||
} else if opt.RootFolderID != "" {
|
|
||||||
// override root folder if set or cached in the config
|
// override root folder if set or cached in the config
|
||||||
f.rootFolderID = opt.RootFolderID
|
f.rootFolderID = opt.RootFolderID
|
||||||
|
} else if f.isTeamDrive {
|
||||||
|
f.rootFolderID = f.opt.TeamDriveID
|
||||||
} else {
|
} else {
|
||||||
// Look up the root ID and cache it in the config
|
// Look up the root ID and cache it in the config
|
||||||
rootID, err := f.getRootID()
|
rootID, err := f.getRootID()
|
||||||
|
Loading…
Reference in New Issue
Block a user