Skip to content

Commit b20c46e

Browse files
committed
fixup! mingw: handle absolute paths in expand_user_path()
1 parent e95db17 commit b20c46e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

path.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include "strbuf.h"
66
#include "string-list.h"
77
#include "dir.h"
8+
#include "exec_cmd.h"
89

910
static int get_st_mode_bits(const char *path, int *mode)
1011
{
@@ -352,7 +353,7 @@ char *expand_user_path(const char *path)
352353
goto return_null;
353354
#ifdef __MINGW32__
354355
if (path[0] == '/')
355-
return system_path((*result) + 1);
356+
return system_path(path + 1);
356357
#endif
357358
if (path[0] == '~') {
358359
const char *first_slash = strchrnul(path, '/');

0 commit comments

Comments
 (0)