X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/4344b05c9b472b84752b8f9f75a372ce1356bcd9..7810fc042d4d3dda6b2c721d09d3eb7eadc12e2d:/apt-pkg/contrib/configuration.cc diff --git a/apt-pkg/contrib/configuration.cc b/apt-pkg/contrib/configuration.cc index 7914bd07b..da57c2054 100644 --- a/apt-pkg/contrib/configuration.cc +++ b/apt-pkg/contrib/configuration.cc @@ -173,6 +173,11 @@ string Configuration::Find(const char *Name,const char *Default) const */ string Configuration::FindFile(const char *Name,const char *Default) const { + const Item *RootItem = Lookup("RootDir"); + std::string rootDir = (RootItem == 0) ? "" : RootItem->Value; + if(rootDir.size() > 0 && rootDir[rootDir.size() - 1] != '/') + rootDir.push_back('/'); + const Item *Itm = Lookup(Name); if (Itm == 0 || Itm->Value.empty() == true) { @@ -204,7 +209,7 @@ string Configuration::FindFile(const char *Name,const char *Default) const Itm = Itm->Parent; } - return val; + return rootDir + val; } /*}}}*/ // Configuration::FindDir - Find a directory name /*{{{*/