Skip to content

Commit

Permalink
gnome-desktop-thumbnail: always return a user.
Browse files Browse the repository at this point in the history
  • Loading branch information
mtwebster committed May 21, 2015
1 parent 3c12a7f commit fce4621
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions libcinnamon-desktop/gnome-desktop-thumbnail.c
Original file line number Diff line number Diff line change
Expand Up @@ -1891,11 +1891,12 @@ get_session_user_pwent (void)
pwent = getpwuid (uid);
} else if (g_getenv ("USERNAME") != NULL) {
pwent = getpwnam (g_getenv ("USERNAME"));
} else if (g_getenv ("USER") != NULL) {
pwent = getpwnam (g_getenv ("USER"));
}

if (!pwent) {
g_printerr ("thumbnailer: Could not determine session user.\n");
return NULL;
return getpwuid (getuid ());
}

return pwent;
Expand Down

0 comments on commit fce4621

Please sign in to comment.