diff --git a/overwrought_master.py b/overwrought_master.py index 9ce2f6f..3add1c8 100755 --- a/overwrought_master.py +++ b/overwrought_master.py @@ -201,7 +201,12 @@ def update_mod(target, delete=False, phase=None): download_mod(mod_latest) mod_latest.save() log_change(f"Updated {mod_latest.title} to {mod_latest.filename}") - if delete: + if not delete: + os.makedirs("mods_old", exist_ok=True) + os.rename(os.path.join("mods", mod_current.filename), + os.path.join("mods_old", mod_current.filename) + ) + else: os.remove(os.path.join("mods", mod_current.filename))