From 3050497c97146f920f471373e22f0c6e17ccb48c Mon Sep 17 00:00:00 2001 From: Brian Gontowski Date: Fri, 2 Jul 2021 08:57:15 +0900 Subject: [PATCH] Write the patched exe using a different name --- Bin/Patch.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Bin/Patch.py b/Bin/Patch.py index 7736fb3..8c24d8a 100644 --- a/Bin/Patch.py +++ b/Bin/Patch.py @@ -26,9 +26,6 @@ if data.find(uuid_pair[2].bytes_le) >= 0: print('The patch has already been applied.') sys.exit(1) - if not os.path.exists('There-Original.exe'): - with open('There.orig', 'wb') as file: - file.write(data) for uuid_pair in uuid_pairs: index = 0 for i in range(uuid_pair[0]): @@ -42,6 +39,6 @@ if data[index:].find(uuid_pair[1].bytes_le) >= 0: print('The patch cannot be used with this version of There.') sys.exit(1) - with open('There.exe', 'wb') as file: + with open('There-Patched.exe', 'wb') as file: file.write(data) print('The patch was applied successfully.')