From 3dbef2b2fda5d896ca6f8cd17893864b9f25f7ca Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Wed, 10 Mar 2021 14:09:30 +0000 Subject: [PATCH] fs: make sure we don't save on the fly remote config to the config file #4996 --- fs/fs.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/fs.go b/fs/fs.go index 02ec37db5..a833a6a07 100644 --- a/fs/fs.go +++ b/fs/fs.go @@ -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 {