From b87413864144dfeca939eecfd38e487ebb75a591 Mon Sep 17 00:00:00 2001 From: Zamitto <167933696+zamitto@users.noreply.github.com> Date: Mon, 13 Oct 2025 08:17:50 -0300 Subject: [PATCH] fix: also test executable name without extension --- src/main/services/process-watcher.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/main/services/process-watcher.ts b/src/main/services/process-watcher.ts index 8c407ad5..06f5f7d8 100644 --- a/src/main/services/process-watcher.ts +++ b/src/main/services/process-watcher.ts @@ -79,11 +79,18 @@ const findGamePathByProcess = async ( const executables = gameExecutables[gameId]; for (const executable of executables) { - const pathSet = processMap.get(executable.exe); + const executablewithoutExtension = executable.exe.replace(/\.exe$/i, ""); + + const pathSet = + processMap.get(executable.exe) ?? + processMap.get(executablewithoutExtension); if (pathSet) { for (const path of pathSet) { - if (path.toLowerCase().endsWith(executable.name)) { + if ( + path.toLowerCase().endsWith(executable.name) || + path.toLowerCase().endsWith(executablewithoutExtension) + ) { const gameKey = levelKeys.game("steam", gameId); const game = await gamesSublevel.get(gameKey); @@ -124,7 +131,6 @@ const getSystemProcessMap = async () => { if (!key || !value) return; const STEAM_COMPAT_DATA_PATH = process.environ?.STEAM_COMPAT_DATA_PATH; - if (STEAM_COMPAT_DATA_PATH) { winePrefixMap.set(value, STEAM_COMPAT_DATA_PATH); }