mirror of
https://github.com/rclone/rclone.git
synced 2024-11-23 00:43:49 +01:00
config: don't offer hidden values for editing in the config - fixes #3416
This commit is contained in:
parent
6812844b3d
commit
23a0332185
@ -1072,12 +1072,13 @@ func editOptions(ri *fs.RegInfo, name string, isNew bool) {
|
||||
}
|
||||
}
|
||||
for _, option := range ri.Options {
|
||||
hasAdvanced = hasAdvanced || option.Advanced
|
||||
isVisible := option.Hide&fs.OptionHideConfigurator == 0
|
||||
hasAdvanced = hasAdvanced || (option.Advanced && isVisible)
|
||||
if option.Advanced != advanced {
|
||||
continue
|
||||
}
|
||||
subProvider := getConfigData().MustValue(name, fs.ConfigProvider, "")
|
||||
if matchProvider(option.Provider, subProvider) {
|
||||
if matchProvider(option.Provider, subProvider) && isVisible {
|
||||
if !isNew {
|
||||
fmt.Printf("Value %q = %q\n", option.Name, FileGet(name, option.Name))
|
||||
fmt.Printf("Edit? (y/n)>\n")
|
||||
@ -1085,13 +1086,11 @@ func editOptions(ri *fs.RegInfo, name string, isNew bool) {
|
||||
continue
|
||||
}
|
||||
}
|
||||
if option.Hide&fs.OptionHideConfigurator == 0 {
|
||||
FileSet(name, option.Name, ChooseOption(&option, name))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// NewRemote make a new remote from its name
|
||||
func NewRemote(name string) {
|
||||
|
Loading…
Reference in New Issue
Block a user