remove ordinary glob escaping (incompatible with windows, use [c])

master
Daniel Kolesa 2017-06-10 19:18:07 +02:00
parent a2f88815bf
commit eba541842c
1 changed files with 12 additions and 25 deletions

View File

@ -113,24 +113,18 @@ namespace detail {
typename filesystem::path::value_type const *wname
) {
/* skip any matching prefix if present */
if (*wname && (*wname != '*')) {
for (;;) {
/* wildcard/other escapes */
if (*wname == '\\') {
++wname;
}
if (!*wname || (*wname == '*')) {
break;
}
/* ? wildcard matches any character */
if ((*wname == '?') && *fname) {
++wname;
++fname;
continue;
}
if (*fname++ != *wname++) {
return false;
}
while (*wname && (*wname != '*')) {
if (!*wname || (*wname == '*')) {
break;
}
/* ? wildcard matches any character */
if ((*wname == '?') && *fname) {
++wname;
++fname;
continue;
}
if (*fname++ != *wname++) {
return false;
}
}
/* skip * wildcards; a wildcard matches 0 or more */
@ -173,13 +167,6 @@ namespace detail {
auto *cs = cur.c_str();
/* this part of the path might contain wildcards */
for (auto c = *cs; c; c = *++cs) {
/* escape sequences for wildcards */
if (c == '\\') {
if (!*++cs) {
break;
}
continue;
}
auto ip = pre;
if (ip.empty()) {
ip = ".";