Skip to content

Commit

Permalink
fixup! Add functionality for converting UNIX paths in arguments and e…
Browse files Browse the repository at this point in the history
…nvironment variables to Windows form for native Win32 applications.

This skips posix-to-windows conversion when '::' is seen: The substring
'::' most often found in an IPv6 address, never in a path (and only in
bogus path lists that contain empty elements).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information
dscho committed Dec 2, 2023
1 parent 4bae40e commit 65def0b
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;
}
Expand Down

0 comments on commit 65def0b

Please sign in to comment.