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:
Neil McPhail 2017-12-10 16:27:36 +00:00 committed by Christoph Oelckers
commit ded0c7805d
3 changed files with 16 additions and 16 deletions

View file

@ -2138,7 +2138,7 @@ static void AddAutoloadFiles(const char *autoname)
D_AddDirectory (allwads, file);
#ifdef __unix__
file = NicePath("~/" GAME_DIR "/skins");
file = NicePath("$HOME/" GAME_DIR "/skins");
D_AddDirectory (allwads, file);
#endif