Skip to content

Commit

Permalink
Leave paths containing any special characters alone
Browse files Browse the repository at this point in the history
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information
dscho committed Sep 6, 2023
1 parent f90152f commit e03e374
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions winsup/cygwin/msys2_path_conv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,20 @@ path_type find_path_start_and_type(const char** src, int recurse, const char* en
if (*it == ':')
goto skip_p2w;

while (it != end && *it) {
switch (*it) {
case '`':
case '\'':
case '"':
case '*':
case '?':
case '[':
case ']':
goto skip_p2w;
++it;
}
it = *src;

while (!isalnum(*it) && *it != '/' && *it != '\\' && *it != ':' && *it != '-' && *it != '.') {
recurse = true;
it = ++*src;
Expand Down

0 comments on commit e03e374

Please sign in to comment.