cmd/syncthing: Fix incorrect shadowing preventing first startup (fixes #4471)
This commit is contained in:
parent
2953fe40d1
commit
5f8c0ca932
@ -978,7 +978,7 @@ func loadConfigAtStartup() *config.Wrapper {
|
|||||||
cfgFile := locations[locConfigFile]
|
cfgFile := locations[locConfigFile]
|
||||||
cfg, err := config.Load(cfgFile, myID)
|
cfg, err := config.Load(cfgFile, myID)
|
||||||
if os.IsNotExist(err) {
|
if os.IsNotExist(err) {
|
||||||
cfg := defaultConfig(cfgFile)
|
cfg = defaultConfig(cfgFile)
|
||||||
cfg.Save()
|
cfg.Save()
|
||||||
l.Infof("Default config saved. Edit %s to taste or use the GUI\n", cfg.ConfigPath())
|
l.Infof("Default config saved. Edit %s to taste or use the GUI\n", cfg.ConfigPath())
|
||||||
} else if err == io.EOF {
|
} else if err == io.EOF {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user