fs: make sure we don't save on the fly remote config to the config file #4996

This commit is contained in:
Nick Craig-Wood 2021-03-10 14:09:30 +00:00
parent f111e0eaf8
commit 3dbef2b2fd

View File

@ -1282,6 +1282,9 @@ type setConfigFile string
// Set a config item into the config file
func (section setConfigFile) Set(key, value string) {
if strings.HasPrefix(string(section), ":") {
Errorf(nil, "Can't save config %q = %q for on the fly backend %q", key, value, section)
}
Debugf(nil, "Saving config %q = %q in section %q of the config file", key, value, section)
err := ConfigFileSet(string(section), key, value)
if err != nil {