summaryrefslogtreecommitdiff
path: root/src/fileops.c
diff options
context:
space:
mode:
authorSven Strickroth <email@cs-ware.de>2012-09-24 18:06:34 +0200
committerSven Strickroth <email@cs-ware.de>2012-09-24 18:06:34 +0200
commit68e75c3a57874d3f1a6a7d36495e9303b69c6a78 (patch)
treef720493f5579f58e20281fe9ea2c149fb9f87e79 /src/fileops.c
parentaed8f8a101872e8b4c81de788a5e675c67b50d20 (diff)
downloadlibgit2-68e75c3a57874d3f1a6a7d36495e9303b69c6a78.tar.gz
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>
Diffstat (limited to 'src/fileops.c')
-rw-r--r--src/fileops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fileops.c b/src/fileops.c
index d85ff7c72..cd0c055ae 100644
--- a/src/fileops.c
+++ b/src/fileops.c
@@ -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");