Skip to content

Commit

Permalink
Skip posix-to-windows conversion when '::' is seen
Browse files Browse the repository at this point in the history
The substring '::' most likely denotes an IPv6 address, not a path.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information
dscho committed Sep 6, 2023
1 parent 0ea33f2 commit eb0accd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions winsup/cygwin/msys2_path_conv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,11 @@ path_type find_path_start_and_type(const char** src, int recurse, const char* en
if (it + 1 < end && it[1] == '~')
goto skip_p2w;
break;
case ':':
// Avoid mangling IPv6 addresses
if (it + 1 < end && it[1] == ':')
goto skip_p2w;
break;
++it;
}
it = *src;
Expand Down

0 comments on commit eb0accd

Please sign in to comment.