Skip to content

Commit 4076235

Browse files
committed
Skip posix-to-windows conversion when '::' is seen
The substring '::' most likely denotes an IPv6 address, not a path. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 6efd127 commit 4076235

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

winsup/cygwin/msys2_path_conv.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,11 @@ path_type find_path_start_and_type(const char** src, int recurse, const char* en
368368
if (it + 1 < end && it[1] == '~')
369369
goto skip_p2w;
370370
break;
371+
case ':':
372+
// Avoid mangling IPv6 addresses
373+
if (it + 1 < end && it[1] == ':')
374+
goto skip_p2w;
375+
break;
371376
++it;
372377
}
373378
it = *src;

0 commit comments

Comments
 (0)