]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/contrib/configuration.cc
add a simple stack handling to be able to delay error handling
[apt.git] / apt-pkg / contrib / configuration.cc
index 80b089fac457d70da68ed2f8fdc3bdb3f7355fc2..9129d92f02a1f35b6e8d6e84217d61e161d552f8 100644 (file)
@@ -773,6 +773,8 @@ bool ReadConfigFile(Configuration &Conf,const string &FName,bool const &AsSectio
               else
                  return _error->Error(_("Syntax error %s:%u: Unsupported directive '%s'"),FName.c_str(),CurLine,Tag.c_str());
            }
+           else if (Tag.empty() == true && NoWord == false && Word == "#clear")
+              return _error->Error(_("Syntax error %s:%u: clear directive requires an option tree as argument"),FName.c_str(),CurLine);
            else
            {
               // Set the item in the configuration class
@@ -832,7 +834,7 @@ bool ReadConfigFile(Configuration &Conf,const string &FName,bool const &AsSectio
 bool ReadConfigDir(Configuration &Conf,const string &Dir,
                   bool const &AsSectional, unsigned const &Depth)
 {
-   vector<string> const List = GetListOfFilesInDir(Dir, "", true);
+   vector<string> const List = GetListOfFilesInDir(Dir, "conf", true, true);
 
    // Read the files
    for (vector<string>::const_iterator I = List.begin(); I != List.end(); I++)