diff options
Diffstat (limited to 'src/libexpr/names.cc')
-rw-r--r-- | src/libexpr/names.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libexpr/names.cc b/src/libexpr/names.cc index 7bca9b6550be..6d78d2116121 100644 --- a/src/libexpr/names.cc +++ b/src/libexpr/names.cc @@ -33,8 +33,8 @@ DrvName::DrvName(const string & s) : hits(0) bool DrvName::matches(DrvName & n) { if (name != "*") { - if (!regex) regex = std::shared_ptr<Regex>(new Regex(name)); - if (!regex->matches(n.name)) return false; + if (!regex) regex = std::unique_ptr<std::regex>(new std::regex(name, std::regex::extended)); + if (!std::regex_match(n.name, *regex)) return false; } if (version != "" && version != n.version) return false; return true; |