Fix failure to write under ~/ in confinement
When running in a confined environment (such as a snap) it may not be possible to write to directories such as ~/.config. By using the $HOME variable instead of the '~' shortcut, the confined environment can pass an alternative 'home' directory with write privelges. I have only changed this for posix/unix and haven't touched code for MacOS, as I don't know if that behaves differently
This commit is contained in:
parent
8b3cc6a617
commit
ded0c7805d
3 changed files with 16 additions and 16 deletions
|
|
@ -125,7 +125,7 @@ FGameConfigFile::FGameConfigFile ()
|
|||
SetValueForKey ("Path", "$HOME", true);
|
||||
SetValueForKey ("Path", "$PROGDIR", true);
|
||||
#else
|
||||
SetValueForKey ("Path", "~/" GAME_DIR, true);
|
||||
SetValueForKey ("Path", "$HOME/" GAME_DIR, true);
|
||||
// Arch Linux likes them in /usr/share/doom
|
||||
// Debian likes them in /usr/share/games/doom
|
||||
// I assume other distributions don't do anything radically different
|
||||
|
|
@ -148,7 +148,7 @@ FGameConfigFile::FGameConfigFile ()
|
|||
#elif !defined(__unix__)
|
||||
SetValueForKey ("Path", "$PROGDIR", true);
|
||||
#else
|
||||
SetValueForKey ("Path", "~/" GAME_DIR, true);
|
||||
SetValueForKey ("Path", "$HOME/" GAME_DIR, true);
|
||||
SetValueForKey ("Path", "/usr/local/share/doom", true);
|
||||
SetValueForKey ("Path", "/usr/local/share/games/doom", true);
|
||||
SetValueForKey ("Path", "/usr/share/doom", true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue