Skip to content

Renderer: MangoHud filename slug diverges from backend sanitization for punctuated titles #45

Description

@I4cTime

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions