From: Andre Noll Date: Mon, 17 Sep 2007 17:08:58 +0000 (+0200) Subject: Revert "string.c: Use $HOME to get the home directory." X-Git-Tag: v0.3.0~389 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=aa1b3b3b2398efd04a95168b9124f51f7d6912cc;p=paraslash.git Revert "string.c: Use $HOME to get the home directory." This reverts commit 379a2724984d903b7be8981a85b6cc82cab6ea90. It doesn't play well with the -u option of para_server. --- 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"); } /**