fix(installer): wrap rename in try/except

So it won't fail I guess, because we failed anyway.
This commit is contained in:
tretrauit 2023-11-08 16:22:30 +07:00
parent f1eb1fe2c6
commit 78df1d242a
2 changed files with 4 additions and 1 deletions

0
worthless/cli.py Executable file → Normal file
View File

View File

@ -397,7 +397,10 @@ class Installer:
print("Failed to patch {}, reverting and let the in-game updater do the job...".format(
old_file.with_suffix(old_suffix))
)
old_file.rename(old_file.with_suffix(old_suffix))
try:
old_file.rename(old_file.with_suffix(old_suffix))
except Exception:
pass
files.remove(patch_file)
# Limit to 8 process running so it doesn't hang the PC.