Summary
The TS slug only replaces \, whitespace, and /; the backend additionally replaces every non-[alnum ._-] char with _. So for a title like "Baldur's Gate 3" the UI advertises wine-Baldur's_Gate_3.conf while the file actually created on disk is wine-Baldur_s_Gate_3.conf.
Location
electron/renderer/src/lib/mangohud-naming.ts:4-10 vs src/game_setup_hub/paths.py:22-35 (used by mangohud.py:222)
Failure scenario
Displayed names/keys don't match disk; list-based "exists" matching against backend listings fails for such titles. Related low bug: per-game MangoHud listing uses stem.replace("wine-", "") (replaces all occurrences, not just prefix) at mangohud.py:232 - wine-my_wine-game.conf lists as my_game.
Fix
Share one canonical sanitization routine between frontend and backend; use removeprefix("wine-") in the listing.
Summary
The TS slug only replaces
\, whitespace, and/; the backend additionally replaces every non-[alnum ._-]char with_. So for a title like "Baldur's Gate 3" the UI advertiseswine-Baldur's_Gate_3.confwhile the file actually created on disk iswine-Baldur_s_Gate_3.conf.Location
electron/renderer/src/lib/mangohud-naming.ts:4-10vssrc/game_setup_hub/paths.py:22-35(used bymangohud.py:222)Failure scenario
Displayed names/keys don't match disk; list-based "exists" matching against backend listings fails for such titles. Related low bug: per-game MangoHud listing uses
stem.replace("wine-", "")(replaces all occurrences, not just prefix) atmangohud.py:232-wine-my_wine-game.conflists asmy_game.Fix
Share one canonical sanitization routine between frontend and backend; use
removeprefix("wine-")in the listing.