Windows logfile should follow -home by default (fixes #918)

This commit is contained in:
Jakob Borg 2014-10-28 20:52:28 +01:00
parent 6820c0a5d7
commit 2ba4b235fc

View File

@ -234,6 +234,13 @@ func main() {
confDir = defConfDir
}
if confDir != defConfDir && filepath.Dir(logFile) == defConfDir {
// The user changed the config dir with -home, but not the log file
// location. In this case we assume they meant for the logfile to
// still live in it's default location *relative to the config dir*.
logFile = filepath.Join(confDir, "syncthing.log")
}
if showVersion {
fmt.Println(LongVersion)
return