X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/4730bca19d5cb04c3c1af5fcf58f0493e705b228..53391d0fc55f118194467b3d436f91fbc1097c31:/apt-pkg/contrib/configuration.cc 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;