Skip to content

Commit cf987ca

Browse files
마누엘dscho
마누엘
authored andcommitted
Fixed path converting with non ascii char.
When a non ascii char is at the beginning of a path the current conversion destroys the path. This fix will prevent this with an extra check for non-ascii UTF-8 characters. Helped-by: Johannes Schindelin <[email protected]> Signed-off-by: 마누엘 <[email protected]>
1 parent 4d61aef commit cf987ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

winsup/cygwin/msys2_path_conv.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ path_type find_path_start_and_type(const char** src, int recurse, const char* en
384384
}
385385
it = *src;
386386

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

0 commit comments

Comments
 (0)