From 161535e40aab0aee3e9c81fb03c83e2d3a780056 Mon Sep 17 00:00:00 2001 From: Headshotnoby Date: Tue, 22 Jun 2021 20:15:25 -0400 Subject: [PATCH] do base folder backup in updater.py --- AO2XP.py | 2 -- updater.py | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/AO2XP.py b/AO2XP.py index 7a4541a..0f11f3a 100644 --- a/AO2XP.py +++ b/AO2XP.py @@ -83,8 +83,6 @@ if not debugmode: code = updater.checkForUpdates(force_update) if code == 0: subprocess.Popen(["./AO2XPupdat"]) - if platform.system() == "Darwin" and ".app" in sys.argv[0]: # bundle - os.system("mv "+path+"/base ./appbase") # move the base folder out of the app folder to avoid deletion os._exit(0) elif osname == "Darwin" and ".app" in sys.argv[0]: # bundle os.chdir(path) # return to Resources folder diff --git a/updater.py b/updater.py index 26ca92c..a427286 100644 --- a/updater.py +++ b/updater.py @@ -186,6 +186,8 @@ class updateThread(QtCore.QThread): print "downloaded update" downloadfile.close() + if platform.system() == "Darwin" and ".app" in sys.argv[0]: # bundle + os.system("cp -r "+path+"/base ./appbase") # move the base folder out of the app folder to avoid deletion returncode = 0 else: returncode = -2