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.

When a non-ASCII character is at the beginning of a path, MSYS2's path
conversion currently destroys the path. This fix will prevent this with
an extra check for non-ascii UTF-8 characters.

Helped-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: 마누엘 <nalla@hamal.uberspace.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information
마누엘 authored and dscho committed Dec 17, 2023
1 parent 5a2ac07 commit eefc347
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion winsup/cygwin/msys2_path_conv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ path_type find_path_start_and_type(const char** src, int recurse, const char* en
}
it = *src;

while (!isalnum(*it) && *it != '/' && *it != '\\' && *it != ':' && *it != '-' && *it != '.') {
while (!isalnum(*it) && !(0x80 & *it) && *it != '/' && *it != '\\' && *it != ':' && *it != '-' && *it != '.') {
recurse = true;
it = ++*src;
if (it == end || *it == '\0') return NONE;
Expand Down

0 comments on commit eefc347

Please sign in to comment.