1
0
Fork 0
forked from fte/fteqw

Fix for bigfoot with his weird trailing slash in his $HOME.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3115 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2009-02-03 00:12:50 +00:00
parent c11da690e1
commit 29e4982454

View file

@ -3277,8 +3277,11 @@ void COM_InitFilesystem (void)
#else #else
//yay for unix!. //yay for unix!.
ev = getenv("HOME"); ev = getenv("HOME");
if (ev) if (ev && *ev)
{ {
if (ev[strlen(ev)-1] == '/')
Q_snprintfz(com_homedir, sizeof(com_homedir), "%s.fte/", ev);
else
Q_snprintfz(com_homedir, sizeof(com_homedir), "%s/.fte/", ev); Q_snprintfz(com_homedir, sizeof(com_homedir), "%s/.fte/", ev);
usehome = true; // always use home on unix unless told not to usehome = true; // always use home on unix unless told not to
} }