From 00eb27ad8a2321785abc1954c160a1f3402cf098 Mon Sep 17 00:00:00 2001 From: John Mclaren Date: Mon, 18 Nov 2024 17:13:40 -0500 Subject: [PATCH] allow multiple instances of restic-browser --- SimpleBackup.au3 | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/SimpleBackup.au3 b/SimpleBackup.au3 index 27238fe..9561a78 100644 --- a/SimpleBackup.au3 +++ b/SimpleBackup.au3 @@ -5,7 +5,7 @@ #AutoIt3Wrapper_UseX64=y #AutoIt3Wrapper_Res_Comment=https://github.com/jmclaren7/restic-simple-backup #AutoIt3Wrapper_Res_Description=SimpleBackup -#AutoIt3Wrapper_Res_Fileversion=1.0.0.273 +#AutoIt3Wrapper_Res_Fileversion=1.0.0.274 #AutoIt3Wrapper_Res_Fileversion_AutoIncrement=y #AutoIt3Wrapper_Res_ProductVersion=1 #AutoIt3Wrapper_Res_LegalCopyright=SimpleBackup @@ -373,11 +373,13 @@ While 1 ; Start the Restic-Browser Case $BrowserMenuItem ; Pack and unpack the Restic-Browser executable - DirCreate($TempDir) - If FileInstall("include\Restic-Browser.exe", $ResticBrowserFullPath, 1) = 0 Then - _Log("FileInstall error") - MsgBox(16, $Title, "Error unpacking program") - Exit + If Not FileExists($ResticBrowserFullPath) Or IsDeclared("ResticBrowserPid") = 0 Then ; Allows a second instance to start without error + DirCreate($TempDir) + If FileInstall("include\Restic-Browser.exe", $ResticBrowserFullPath, 1) = 0 Then + _Log("FileInstall error") + MsgBox(16, $Title, "Error unpacking program") + Exit + EndIf EndIf ; Run a dummy restic command to unpack the restic executable