mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 20:38:08 +01:00
Repair wgethomedir(), broken a little while back
Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
This commit is contained in:
committed by
Carlos R. Mafra
parent
f4890b17e6
commit
d59dacbccd
@@ -36,14 +36,17 @@
|
||||
char *wgethomedir()
|
||||
{
|
||||
static char *home = NULL;
|
||||
char *tmp;
|
||||
struct passwd *user;
|
||||
|
||||
if (home)
|
||||
return home;
|
||||
|
||||
home = getenv("HOME");
|
||||
if (home)
|
||||
tmp = getenv("HOME");
|
||||
if (tmp) {
|
||||
home = wstrdup(tmp);
|
||||
return home;
|
||||
}
|
||||
|
||||
user = getpwuid(getuid());
|
||||
if (!user) {
|
||||
|
||||
Reference in New Issue
Block a user