Sync with 1.7.0 series
This commit is contained in:
2
path.c
2
path.c
@ -316,6 +316,8 @@ char *expand_user_path(const char *path)
|
||||
size_t username_len = first_slash - username;
|
||||
if (username_len == 0) {
|
||||
const char *home = getenv("HOME");
|
||||
if (!home)
|
||||
goto return_null;
|
||||
strbuf_add(&user_path, home, strlen(home));
|
||||
} else {
|
||||
struct passwd *pw = getpw_str(username, username_len);
|
||||
|
Reference in New Issue
Block a user