parent
1cabba8755
commit
b3e192a4e1
12
lib/utils.h
12
lib/utils.h
|
@ -148,8 +148,7 @@ inline static bool matchglob(const std::string& pattern, const std::string& name
|
||||||
// Any character matches unless we're at the end of the name
|
// Any character matches unless we're at the end of the name
|
||||||
if (*n != '\0') {
|
if (*n != '\0') {
|
||||||
n++;
|
n++;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
matching = false;
|
matching = false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -157,14 +156,11 @@ inline static bool matchglob(const std::string& pattern, const std::string& name
|
||||||
// Non-wildcard characters match literally
|
// Non-wildcard characters match literally
|
||||||
if (*n == *p) {
|
if (*n == *p) {
|
||||||
n++;
|
n++;
|
||||||
}
|
} else if (*n == '\\' && *p == '/') {
|
||||||
else if (*n == '\\' && *p == '/') {
|
|
||||||
n++;
|
n++;
|
||||||
}
|
} else if (*n == '/' && *p == '\\') {
|
||||||
else if (*n == '/' && *p == '\\') {
|
|
||||||
n++;
|
n++;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
matching = false;
|
matching = false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue