aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/utils.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/utils.c b/src/utils.c
index 530de5a78..9bab473c5 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -134,14 +134,12 @@ char *parsePath(char *path)
home = passwd->pw_dir;
} else {
- struct passwd *passwd = getpwuid(geteuid());
- if (!passwd) {
- g_warning("problems getting passwd "
- "entry for current user");
+ home = g_get_home_dir();
+ if (home == NULL) {
+ g_warning("problems getting home "
+ "for current user");
return NULL;
}
-
- home = passwd->pw_dir;
}
} else {
bool foundSlash = false;