From 3a0863c795139a8f40a10629087d1cbe1b9a64cd Mon Sep 17 00:00:00 2001 From: Zebra2711 Date: Mon, 19 Jan 2026 12:09:44 +0700 Subject: [PATCH] fix warning `executable file does not exist` Resolves #6347 --- lutris/runners/wine.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lutris/runners/wine.py b/lutris/runners/wine.py index 4f2fe82ab..635ccfc3c 100644 --- a/lutris/runners/wine.py +++ b/lutris/runners/wine.py @@ -109,16 +109,20 @@ def _get_prefix_warning(_option_key: str, config: LutrisConfig) -> Optional[str] def _get_exe_warning(_option_key: str, config: LutrisConfig) -> Optional[str]: exe = config.game_config.get("exe") + working_dir = config.game_config.get("working_dir") if not exe: return _("Warning No executable path specified") _exe = exe.strip() good_path = exe == _exe if not _exe: return _("Warning No executable path specified") - if good_path and os.path.isfile(_exe): - return None - elif not good_path: + if not good_path: return _("Warning Executable path has extra whitespace at the beginning or end") + if os.path.isfile(_exe): + return None + if working_dir is not None: + if os.path.isfile(os.path.join(working_dir, _exe)): + return None return _("Warning Executable file does not exist")