forked from TrueCloudLab/rclone
drive: fix config system overwriting team drive ID - fixes #5454
This commit is contained in:
parent
770b3496a1
commit
807102ada2
1 changed files with 8 additions and 1 deletions
|
@ -210,12 +210,19 @@ func init() {
|
||||||
if opt.TeamDriveID == "" {
|
if opt.TeamDriveID == "" {
|
||||||
return fs.ConfigConfirm("teamdrive_ok", false, "config_change_team_drive", "Configure this as a Shared Drive (Team Drive)?\n")
|
return fs.ConfigConfirm("teamdrive_ok", false, "config_change_team_drive", "Configure this as a Shared Drive (Team Drive)?\n")
|
||||||
}
|
}
|
||||||
return fs.ConfigConfirm("teamdrive_ok", false, "config_change_team_drive", fmt.Sprintf("Change current Shared Drive (Team Drive) ID %q?\n", opt.TeamDriveID))
|
return fs.ConfigConfirm("teamdrive_change", false, "config_change_team_drive", fmt.Sprintf("Change current Shared Drive (Team Drive) ID %q?\n", opt.TeamDriveID))
|
||||||
case "teamdrive_ok":
|
case "teamdrive_ok":
|
||||||
if config.Result == "false" {
|
if config.Result == "false" {
|
||||||
m.Set("team_drive", "")
|
m.Set("team_drive", "")
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
return fs.ConfigGoto("teamdrive_config")
|
||||||
|
case "teamdrive_change":
|
||||||
|
if config.Result == "false" {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
return fs.ConfigGoto("teamdrive_config")
|
||||||
|
case "teamdrive_config":
|
||||||
f, err := newFs(ctx, name, "", m)
|
f, err := newFs(ctx, name, "", m)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errors.Wrap(err, "failed to make Fs to list Shared Drives")
|
return nil, errors.Wrap(err, "failed to make Fs to list Shared Drives")
|
||||||
|
|
Loading…
Add table
Reference in a new issue