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,9 +3277,12 @@ void COM_InitFilesystem (void)
#else
//yay for unix!.
ev = getenv("HOME");
if (ev)
if (ev && *ev)
{
Q_snprintfz(com_homedir, sizeof(com_homedir), "%s/.fte/", 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);
usehome = true; // always use home on unix unless told not to
}
else