X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=string.c;h=60050ad7afaf822acd6883c08c222808ce1bbeab;hp=0d7e05e66c3f8c88cb4738ff72ad9047f63cc07c;hb=61a4bf7d89c6757957c4171c67dcb11de111eef5;hpb=379a2724984d903b7be8981a85b6cc82cab6ea90 diff --git a/string.c b/string.c index 0d7e05e6..60050ad7 100644 --- a/string.c +++ b/string.c @@ -300,8 +300,8 @@ __must_check __malloc char *para_logname(void) */ __must_check __malloc char *para_homedir(void) { - char *h = getenv("HOME"); - return para_strdup(h? h : "/tmp"); + struct passwd *pw = getpwuid(getuid()); + return para_strdup(pw? pw->pw_dir : "/tmp"); } /**