diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2009-07-30 15:31:39 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2009-07-30 15:31:39 +0200 |
commit | 57722714255118560c98b3245413ff5f693b993c (patch) | |
tree | 48f4e1c25d7fd07bdbec6e7effa792739c157402 /apt-pkg/contrib/configuration.cc | |
parent | 8dfb8a0ab2c2a06e319678701c144e5156d7e869 (diff) | |
parent | d5752e18bed18c706c93f5c43c61016c72132ede (diff) |
merged from debian-sid
Diffstat (limited to 'apt-pkg/contrib/configuration.cc')
-rw-r--r-- | apt-pkg/contrib/configuration.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apt-pkg/contrib/configuration.cc b/apt-pkg/contrib/configuration.cc index 7326b84ea..48a5f0bff 100644 --- a/apt-pkg/contrib/configuration.cc +++ b/apt-pkg/contrib/configuration.cc @@ -182,9 +182,9 @@ string Configuration::FindFile(const char *Name,const char *Default) const if (Itm == 0 || Itm->Value.empty() == true) { if (Default == 0) - return ""; + return rootDir; else - return Default; + return rootDir + Default; } string val = Itm->Value; @@ -521,6 +521,7 @@ bool ReadConfigFile(Configuration &Conf,const string &FName,bool AsSectional, F.getline(Buffer,sizeof(Buffer) / 2); Input += Buffer; + delete[] Buffer; } while (F.fail() && !F.eof()); @@ -582,7 +583,7 @@ bool ReadConfigFile(Configuration &Conf,const string &FName,bool AsSectional, if (InQuote == true) continue; - if (*I == '/' && I + 1 != End && I[1] == '/') + if ((*I == '/' && I + 1 != End && I[1] == '/') || *I == '#') { End = I; break; |