mirror of
https://github.com/rclone/rclone.git
synced 2025-02-04 12:39:35 +01:00
config: SetValueAndSave ignore error if config section does not exist yet
This commit is contained in:
parent
9b5308144f
commit
5ddfa9f7f6
@ -575,7 +575,7 @@ func SetValueAndSave(name, key, value string) (err error) {
|
|||||||
_, err = reloadedConfigFile.GetSection(name)
|
_, err = reloadedConfigFile.GetSection(name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// Section doesn't exist yet so ignore reload
|
// Section doesn't exist yet so ignore reload
|
||||||
return err
|
return nil
|
||||||
}
|
}
|
||||||
// Update the config file with the reloaded version
|
// Update the config file with the reloaded version
|
||||||
configFile = reloadedConfigFile
|
configFile = reloadedConfigFile
|
||||||
|
Loading…
Reference in New Issue
Block a user