update moves old mod to mods_old/
This commit is contained in:
parent
e0afebc5e6
commit
552e16e9cf
|
@ -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))
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user