diff --git a/cmd/syncthing/main.go b/cmd/syncthing/main.go index 3917c42e..accc2a6d 100644 --- a/cmd/syncthing/main.go +++ b/cmd/syncthing/main.go @@ -225,10 +225,6 @@ func defaultRuntimeOptions() RuntimeOptions { logFlags: log.Ltime, } - if options.assetDir != "" { - options.assetDir = locations[locGUIAssets] - } - if os.Getenv("STTRACE") != "" { options.logFlags = log.Ltime | log.Ldate | log.Lmicroseconds | log.Lshortfile } @@ -308,6 +304,12 @@ func main() { options.logFile = locations[locLogFile] } + if options.assetDir == "" { + // The asset dir is blank if STGUIASSETS wasn't set, in which case we + // should look for extra assets in the default place. + options.assetDir = locations[locGUIAssets] + } + if options.showVersion { fmt.Println(LongVersion) return