1
0
Fork 0
mirror of synced 2024-06-29 11:40:37 +12:00

LaunchDialog: Do case-insensitive search for the games executable

This commit is contained in:
loathingKernel 2023-01-24 15:21:25 +02:00
parent 4063195b4d
commit 91ef4ca944

View file

@ -109,7 +109,10 @@ class ImageWorker(LaunchWorker):
igame_executable = override_exe
else:
igame_executable = igame.executable
if not os.path.exists(os.path.join(igame.install_path, igame_executable.replace("\\", "/").lstrip("/"))):
# lk: Case-insensitive search for the game's executable (example: Brothers - A Tale of two Sons)
executable_path = os.path.join(igame.install_path, igame_executable.replace("\\", "/").lstrip("/"))
file_list = map(str.lower, os.listdir(os.path.dirname(executable_path)))
if not os.path.basename(executable_path).lower() in file_list:
igame.needs_verification = True
self.core.lgd.set_installed_game(igame.app_name, igame)
logger.info(f"{igame.title} needs verification")