Correct GUI asset dir handling (fixes #2621)

This commit is contained in:
Jakob Borg 2015-12-26 13:31:58 +01:00
parent b7a58d2f87
commit 8b726c7e8b
1 changed files with 6 additions and 4 deletions

View File

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