#1124316 hannah: assumes the home directory is /home/$USER which is not always true

Package:
hannah
Source:
hannah
Description:
pacman-like game, child oriented
Submitter:
Simon McVittie
Date:
2025-12-30 11:44:03 UTC
Severity:
normal
Tags:
#1124316#5
Date:
2025-12-30 11:43:09 UTC
From:
To:
While looking into /usr/games/hannah being setgid (see separate bug
report) I noticed that it uses /home/$USER/.hannah, instead of ~/.hannah
(or even $XDG_DATA_HOME/Hannah). This is usually right for most Linux
systems, but it isn't correct for all installations/users.

One possible solution upstream would be to use

    SDL_GetPrefPath("FatHorseGames", "Hannah")

for new installations, matching the path it already uses on Windows. On
Unix, this would usually expand to ~/.local/share/Hannah (ignoring the
vendor and using only the app name, as is conventional on Unix) while on
Windows it would continue to be %APPDATA%\FatHorseGames\Hannah (with
both the vendor and app name, as is conventional on Windows).

Ideally it would move or copy the high scores from /home/$USER/.hannah
to the new path, if present.

Or, failing that, it could prefer to use $HOME/.hannah/ instead of
/home/$USER/.hannah/.

    smcv