Fixes bug with infinite restoring loop if file does not exist

This commit is contained in:
2022-02-10 09:46:45 -05:00
parent f9c27977bb
commit 7256a5d8fc

View File

@@ -416,9 +416,13 @@ Deny from all""")
database.restore(file)
dailyMaintenance()
writeLog(f"Backup {file} was succesfully restored", 18)
os.remove(location + "restore.json")
except:
writeLog(f"Restore for {file} failed", 9)
#Makes sure to clean up after it is done
try:
os.remove(location + "restore.json")
except:
1
try:
os.remove(location + "maintenance-mode")
except: