summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/configuration.cc
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:56:59 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:56:59 +0000
commitbcae6dd40485fce886c08c101d39226d6aba7022 (patch)
tree0e15b6fc3a9bc76dde8fb7bdbc86c19abf84c89a /apt-pkg/contrib/configuration.cc
parenta77ad7c3ce8c8621936d3527a967ef36a361bc71 (diff)
Fixed the resetting of Dir with "dir {};". Closes: #87323
Author: jgg Date: 2001-03-04 00:44:35 GMT Fixed the resetting of Dir with "dir {};". Closes: #87323
Diffstat (limited to 'apt-pkg/contrib/configuration.cc')
-rw-r--r--apt-pkg/contrib/configuration.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/apt-pkg/contrib/configuration.cc b/apt-pkg/contrib/configuration.cc
index 18dded669..81521590a 100644
--- a/apt-pkg/contrib/configuration.cc
+++ b/apt-pkg/contrib/configuration.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: configuration.cc,v 1.16 2001/03/03 23:29:55 jgg Exp $
+// $Id: configuration.cc,v 1.17 2001/03/04 00:44:35 jgg Exp $
/* ######################################################################
Configuration Class
@@ -573,6 +573,7 @@ bool ReadConfigFile(Configuration &Conf,string FName,bool AsSectional,
// Parse off the word
string Word;
+ bool NoWord = false;
if (ParseCWord(Pos,Word) == false &&
ParseQuoteWord(Pos,Word) == false)
{
@@ -580,7 +581,8 @@ bool ReadConfigFile(Configuration &Conf,string FName,bool AsSectional,
{
Word = Tag;
Tag = "";
- }
+ }
+ NoWord = true;
}
if (strlen(Pos) != 0)
return _error->Error(_("Syntax error %s:%u: Extra junk after value"),FName.c_str(),CurLine);
@@ -648,7 +650,8 @@ bool ReadConfigFile(Configuration &Conf,string FName,bool AsSectional,
else
{
// Set the item in the configuration class
- Conf.Set(Item,Word);
+ if (NoWord == false)
+ Conf.Set(Item,Word);
}
// Empty the buffer