From aa1b3b3b2398efd04a95168b9124f51f7d6912cc Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Mon, 17 Sep 2007 19:08:58 +0200 Subject: [PATCH] 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. --- string.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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"); } /** -- 2.39.2