]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/contrib/configuration.cc
* apt-pkg/contrib/fileutils.h:
[apt.git] / apt-pkg / contrib / configuration.cc
index 0f7b37ee9964d0592b09806da07fdf50a44fc5d3..0949ec2238752bde6f399c463ea61b663c75ecfc 100644 (file)
@@ -873,10 +873,10 @@ Configuration::MatchAgainstConfig::MatchAgainstConfig(char const * Config)
       {
         regfree(p);
         delete p;
-        clearPatterns();
-        _error->Warning("Regex compilation error for '%s' in configuration option '%s'",
-                               s->c_str(), Config);
-        return;
+        _error->Warning("Invalid regular expression '%s' in configuration "
+                         "option '%s' will be ignored.",
+                         s->c_str(), Config);
+        continue;
       }
    }
    if (strings.size() == 0)
@@ -897,6 +897,7 @@ void Configuration::MatchAgainstConfig::clearPatterns()
       regfree(*p);
       delete *p;
    }
+   patterns.clear();
 }
                                                                        /*}}}*/
 // MatchAgainstConfig::Match - returns true if a pattern matches       /*{{{*/