From 601a4fac1a831019d475b8257231e49e1ba7edc9 Mon Sep 17 00:00:00 2001 From: Simon Frei Date: Thu, 9 Mar 2017 14:57:12 +0000 Subject: [PATCH] cmd/syncthing: Accept absolute -home paths (regression from #3183) GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4033 --- cmd/syncthing/main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/syncthing/main.go b/cmd/syncthing/main.go index 3dcfce8cd..a39f9f6e9 100644 --- a/cmd/syncthing/main.go +++ b/cmd/syncthing/main.go @@ -345,12 +345,13 @@ func main() { if options.confDir != "" { // Not set as default above because the string can be really long. if !filepath.IsAbs(options.confDir) { - path, err := filepath.Abs(options.confDir) + var err error + options.confDir, err = filepath.Abs(options.confDir) if err != nil { l.Fatalln(err) } - baseDirs["config"] = path } + baseDirs["config"] = options.confDir } if err := expandLocations(); err != nil {