summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/configuration.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2010-04-24 12:44:11 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2010-04-24 12:44:11 +0200
commitc3a3a1b1b68706df40dc022bdcdf8ede684f5956 (patch)
tree072118e906284e4f2a688380eefc9be62c044209 /apt-pkg/contrib/configuration.cc
parent6838dd8781d2986e51b7c65b7b404a70cfcd2321 (diff)
* apt-pkg/contrib/configuration.cc:
- error out if #clear directive has no argument
Diffstat (limited to 'apt-pkg/contrib/configuration.cc')
-rw-r--r--apt-pkg/contrib/configuration.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/apt-pkg/contrib/configuration.cc b/apt-pkg/contrib/configuration.cc
index 7588b041c..9129d92f0 100644
--- a/apt-pkg/contrib/configuration.cc
+++ b/apt-pkg/contrib/configuration.cc
@@ -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