mirror of
https://github.com/git/git.git
synced 2026-02-04 06:53:10 +00:00
mingw: handle absolute paths in expand_user_path()
On Windows, an absolute POSIX path needs to be turned into a Windows one. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
4
path.c
4
path.c
@@ -350,6 +350,10 @@ char *expand_user_path(const char *path)
|
||||
|
||||
if (path == NULL)
|
||||
goto return_null;
|
||||
#ifdef __MINGW32__
|
||||
if (path[0] == '/')
|
||||
return system_path((*result) + 1);
|
||||
#endif
|
||||
if (path[0] == '~') {
|
||||
const char *first_slash = strchrnul(path, '/');
|
||||
const char *username = path + 1;
|
||||
|
||||
Reference in New Issue
Block a user