updater: change the returncode check
Signed-off-by: tretrauit <tretrauit@gmail.com>
This commit is contained in:
parent
98898827e9
commit
178f513e52
@ -374,14 +374,14 @@ class Installer:
|
||||
proc = await self._hdiffpatch.patch_file(old_file, old_file.with_suffix(old_suffix),
|
||||
patch_path, wait=True)
|
||||
patch_path.unlink()
|
||||
if proc.returncode != 0:
|
||||
if proc.returncode == 0:
|
||||
await old_file.unlink()
|
||||
return
|
||||
# Let the game download the file.
|
||||
print("Failed to patch {}, reverting and let the in-game updater do the job...".format(
|
||||
old_file.with_suffix(old_suffix))
|
||||
)
|
||||
await old_file.rename(old_file.with_suffix(old_suffix))
|
||||
return
|
||||
await old_file.unlink()
|
||||
|
||||
files.remove(patch_file)
|
||||
patch_jobs.append(extract_and_patch(current_game_file, patch_file))
|
||||
|
Loading…
Reference in New Issue
Block a user