Consistency fix when looking up the home folder

This commit is contained in:
Pierre Pronchery 2015-10-04 20:49:07 +02:00
parent b407f0f865
commit ed8a7df3ab

View File

@ -213,8 +213,8 @@ static gboolean _mime_icon_folder_in_home(struct stat * pst)
if(homedir == NULL) if(homedir == NULL)
{ {
if((homedir = g_get_home_dir()) == NULL if((homedir = getenv("HOME")) == NULL
&& (homedir = getenv("HOME")) == NULL) && (homedir = g_get_home_dir()) == NULL)
return FALSE; return FALSE;
if(browser_vfs_stat(homedir, &hst) != 0) if(browser_vfs_stat(homedir, &hst) != 0)
{ {
@ -234,8 +234,8 @@ static gboolean _mime_icon_folder_is_home(struct stat * st)
if(homedir == NULL) if(homedir == NULL)
{ {
if((homedir = g_get_home_dir()) == NULL if((homedir = getenv("HOME")) == NULL
&& (homedir = getenv("HOME")) == NULL) && (homedir = g_get_home_dir()) == NULL)
return FALSE; return FALSE;
if(browser_vfs_stat(homedir, &hst) != 0) if(browser_vfs_stat(homedir, &hst) != 0)
{ {