mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
util: fix escaping more than one ?* in glob_to_regex
This commit is contained in:
parent
b353da51f9
commit
1cc36a652b
1 changed files with 3 additions and 3 deletions
|
@ -1000,13 +1000,13 @@ std::string get_nix_version_display_string()
|
||||||
for (char c: val)
|
for (char c: val)
|
||||||
{
|
{
|
||||||
if (c == '*')
|
if (c == '*')
|
||||||
newval += escape ? "*" : ".*";
|
newval += escape ? "*" : ".*", escape = false;
|
||||||
else if (c == '?')
|
else if (c == '?')
|
||||||
newval += escape ? "?" : ".";
|
newval += escape ? "?" : ".", escape = false;
|
||||||
else if (c == '\\')
|
else if (c == '\\')
|
||||||
newval += '\\', escape = !escape;
|
newval += '\\', escape = !escape;
|
||||||
else
|
else
|
||||||
newval += c;
|
newval += c, escape = false;
|
||||||
}
|
}
|
||||||
return newval;
|
return newval;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue