mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-29 18:38:58 +00:00
Calculate the Windows user profile directory the same way as msysgit
On most systems %USERPROFILE% is the same as %HOMEDRIVE%\%HOMEPATH%, however, for windows machines in an AD or domain environment this might be different and %HOMEDRIVE%\%HOMEPATH% seems to be better. Signed-off-by: Sven Strickroth <email@cs-ware.de>
This commit is contained in:
parent
aed8f8a101
commit
68e75c3a57
@ -469,7 +469,7 @@ int git_futils_find_global_file(git_buf *path, const char *filename)
|
||||
}
|
||||
}
|
||||
|
||||
if (win32_expand_path(&root, L"%USERPROFILE%\\") < 0 ||
|
||||
if (win32_expand_path(&root, L"%HOMEDRIVE%\\%HOMEPATH%\\") < 0 ||
|
||||
root.path[0] == L'%') /* i.e. no expansion happened */
|
||||
{
|
||||
giterr_set(GITERR_OS, "Cannot locate the user's profile directory");
|
||||
|
Loading…
Reference in New Issue
Block a user