Skip to content

Commit 0126043

Browse files
added black ops game exe path validation
1 parent fcf08a5 commit 0126043

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

black_ops_mod_tools_installer.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,10 @@ def print_complete_message():
144144

145145

146146
def open_game():
147-
black_ops_path = f'{script_dir}/{process_name}'
147+
black_ops_path = os.path.normpath(f'{script_dir}/{process_name}')
148+
if not os.path.isfile(black_ops_path):
149+
missing_exe_error = f'No black ops exe was found at the following location: "{black_ops_path}"'
150+
raise FileNotFoundError(missing_exe_error)
148151
subprocess.run(black_ops_path)
149152
time.sleep(45)
150153

0 commit comments

Comments
 (0)