aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexander Blair <snipa@jagtech.io>2020-12-01 14:19:21 -0800
committerAlexander Blair <snipa@jagtech.io>2020-12-01 14:19:21 -0800
commit003a06f030de7bf52b2617f2d24976ff22dd3d5e (patch)
treed519f12b8395bf9b470261331914ec046de312ff /src
parentMerge pull request #6910 (diff)
parentutil: fix escaping more than one ?* in glob_to_regex (diff)
downloadmonero-003a06f030de7bf52b2617f2d24976ff22dd3d5e.tar.xz
Merge pull request #6923
cc034fe0c util: fix escaping more than one ?* in glob_to_regex (moneromooo-monero)
Diffstat (limited to 'src')
-rw-r--r--src/common/util.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/util.cpp b/src/common/util.cpp
index 433cb4919..f8707d65c 100644
--- a/src/common/util.cpp
+++ b/src/common/util.cpp
@@ -1000,13 +1000,13 @@ std::string get_nix_version_display_string()
for (char c: val)
{
if (c == '*')
- newval += escape ? "*" : ".*";
+ newval += escape ? "*" : ".*", escape = false;
else if (c == '?')
- newval += escape ? "?" : ".";
+ newval += escape ? "?" : ".", escape = false;
else if (c == '\\')
newval += '\\', escape = !escape;
else
- newval += c;
+ newval += c, escape = false;
}
return newval;
}