diff --git a/bugn.exe b/bugn.exe index 777895c..82740d7 100644 Binary files a/bugn.exe and b/bugn.exe differ diff --git a/src/Config.ahk b/src/Config.ahk index 7e63d0a..b8c8f5c 100644 --- a/src/Config.ahk +++ b/src/Config.ahk @@ -164,8 +164,9 @@ Config_convertSystemColor(systemColor) Config_edit() { Global Config_filePath - If FileExist(Config_filePath) - Run, edit %Config_filePath% + If Not FileExist(Config_filePath) + Config_UI_saveSession() + Run, edit %Config_filePath% } Config_getSystemSettings() { @@ -396,12 +397,10 @@ Config_saveSession(original, target) ;; The FileMove below is an all-or-nothing replacement of the file. ;; We don't want to leave this half-finished. FileAppend, %text%, %tmpfilename% - If ErrorLevel - { + If ErrorLevel And Not (original = Config_filePath And target = Config_filePath And Not FileExist(original)) { If FileExist(tmpfilename) FileDelete, %tmpfilename% - } - Else + } Else FileMove, %tmpfilename%, %target%, 1 }