diff --git a/path.c b/path.c index efcedafba6..fafbc47db4 100644 --- a/path.c +++ b/path.c @@ -7,6 +7,7 @@ #include "dir.h" #include "worktree.h" #include "submodule-config.h" +#include "exec_cmd.h" static int get_st_mode_bits(const char *path, int *mode) { @@ -646,6 +647,10 @@ char *expand_user_path(const char *path) if (path == NULL) goto return_null; +#ifdef __MINGW32__ + if (path[0] == '/') + return system_path(path + 1); +#endif if (path[0] == '~') { const char *first_slash = strchrnul(path, '/'); const char *username = path + 1;