]> git.saurik.com Git - apt.git/commitdiff
Fixed the resetting of Dir with "dir {};". Closes: #87323
authorArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 16:56:59 +0000 (16:56 +0000)
committerArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 16:56:59 +0000 (16:56 +0000)
Author: jgg
Date: 2001-03-04 00:44:35 GMT
Fixed the resetting of Dir with "dir {};". Closes: #87323

apt-pkg/contrib/configuration.cc
debian/changelog

index 18dded669100721da838567927c7fc7924be1a83..81521590a6fb4f9d29933d50366a87d21133e8f6 100644 (file)
@@ -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
index 594915b7591e5e9c8597e598028ee95bf7acb3cd..96d948e66d63ec35271e54b09836b84ad3564f80 100644 (file)
@@ -20,6 +20,7 @@ apt (0.5.1) unstable; urgency=low
   * Some instances where the status file can source a package in a
     non-sensical way. Closes: #87390
   * Work better if there are duplicate sources.list entries.
+  * Fixed the resetting of Dir with "dir {};". Closes: #87323
   
  -- Jason Gunthorpe <jgg@debian.org>  Thu, 22 Feb 2001 00:39:15 -0500