From 93a66deb7e96e73f2230848f84eadd69ae3f8b3c Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Sat, 28 Oct 2017 21:14:37 +0200 Subject: [PATCH] cmd/syncthing: Fix incorrect shadowing preventing first startup (fixes #4471) --- cmd/syncthing/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/syncthing/main.go b/cmd/syncthing/main.go index 132422394..316a65dec 100644 --- a/cmd/syncthing/main.go +++ b/cmd/syncthing/main.go @@ -978,7 +978,7 @@ func loadConfigAtStartup() *config.Wrapper { cfgFile := locations[locConfigFile] cfg, err := config.Load(cfgFile, myID) if os.IsNotExist(err) { - cfg := defaultConfig(cfgFile) + cfg = defaultConfig(cfgFile) cfg.Save() l.Infof("Default config saved. Edit %s to taste or use the GUI\n", cfg.ConfigPath()) } else if err == io.EOF {