From 842e873a943ba05e8368cf4ccfd760357a11c162 Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Wed, 18 Jan 2017 18:59:48 +0100 Subject: [PATCH] cmd/syncthing: Fix -logfile/-no-restart test on non-Windows. --- cmd/syncthing/main.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cmd/syncthing/main.go b/cmd/syncthing/main.go index 285c8a71..f5fbfc3d 100644 --- a/cmd/syncthing/main.go +++ b/cmd/syncthing/main.go @@ -320,9 +320,11 @@ func main() { os.Setenv("STGUIAPIKEY", options.guiAPIKey) } - // Check for options which are not compatible with each other - // Have to check logfile before it's set to the default below - we only want to complain if they set -logfile explicitly, not if it's set to its default location - if options.noRestart && options.logFile != "" { + // Check for options which are not compatible with each other. We have + // to check logfile before it's set to the default below - we only want + // to complain if they set -logfile explicitly, not if it's set to its + // default location + if options.noRestart && (options.logFile != "" && options.logFile != "-") { l.Fatalln("-logfile may not be used with -no-restart or STNORESTART") }