@@ -231,7 +231,7 @@ ReplacePaths(FilePath, LibreWolfPathUri, ProfilePathUri, OverridesPath = False)
231231 If (File = FileOrg)
232232 Return False
233233 Else {
234- FileMove , %FilePath%, %ProfilePath%\% FilePath%.pbak, 1
234+ FileMove , %FilePath%, %FilePath%.pbak, 1
235235 If (ErrorLevel )
236236 Die(_FileWriteError, FilePath " .pbak" )
237237 FileAppend , %File%, %FilePath%
@@ -315,6 +315,13 @@ ProcessRunning(Where := "") {
315315 Return False
316316}
317317
318+ Die (Error, Var := False ) {
319+ If (Var)
320+ Error := StrReplace (Error , " {}" , Var)
321+ MsgBox , 48 , %_Title%, %Error %
322+ CleanUp()
323+ }
324+
318325CleanUp () {
319326 ; Wait until all launcher instances are closed before restoring backed up registry key
320327 If (RegBackedUp And OtherLauncherRunning())
@@ -356,13 +363,6 @@ CleanUp() {
356363 Exit ()
357364}
358365
359- Die (Error, Var := False ) {
360- If (Var)
361- Error := StrReplace (Error , " {}" , Var)
362- MsgBox , 48 , %_Title%, %Error %
363- Exit ()
364- }
365-
366366Exit () {
367367 ExitApp
368368}
0 commit comments