cmd/syncthing: Accept absolute -home paths (regression from #3183)

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4033
This commit is contained in:
Simon Frei 2017-03-09 14:57:12 +00:00 committed by Jakob Borg
parent f4ccc69422
commit 601a4fac1a
1 changed files with 3 additions and 2 deletions

View File

@ -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 {