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()
|
char *wgethomedir()
|
||||||
{
|
{
|
||||||
static char *home = NULL;
|
static char *home = NULL;
|
||||||
|
char *tmp;
|
||||||
struct passwd *user;
|
struct passwd *user;
|
||||||
|
|
||||||
if (home)
|
if (home)
|
||||||
return home;
|
return home;
|
||||||
|
|
||||||
home = getenv("HOME");
|
tmp = getenv("HOME");
|
||||||
if (home)
|
if (tmp) {
|
||||||
|
home = wstrdup(tmp);
|
||||||
return home;
|
return home;
|
||||||
|
}
|
||||||
|
|
||||||
user = getpwuid(getuid());
|
user = getpwuid(getuid());
|
||||||
if (!user) {
|
if (!user) {
|
||||||
|
|||||||
Reference in New Issue
Block a user