sometimes... HOME is not set... believe it or not! :)

SVN revision: 25999
This commit is contained in:
Carsten Haitzler 2006-09-21 12:59:44 +00:00
parent 3fb0627858
commit 05cd95e44d
1 changed files with 4 additions and 1 deletions

View File

@ -736,7 +736,10 @@ ecore_desktop_home_get()
int len;
/* Get Home Dir, check for trailing '/', strip it */
strncpy(home, getenv("HOME"), PATH_MAX);
if (getenv("HOME"))
strncpy(home, getenv("HOME"), PATH_MAX);
else
strcpy(home, "/");
len = strlen(home) - 1;
while ((len >= 0) && (home[len] == '/'))
{