diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2008-01-03 13:48:03 +0100 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2008-01-03 13:48:03 +0100 |
commit | bc87e700890863acd48fd61a5bc8dcc2386afd20 (patch) | |
tree | 1296f72efbd86945ce960a8e6e7d260b23e839e3 /apt-pkg/contrib/configuration.cc | |
parent | e0fe131836913901c8b353e38d74cc1526fcaf78 (diff) | |
parent | 3a6d37fdcfbdb152eb00371ff69b8871c9a02527 (diff) |
merge from apt--mvo
Diffstat (limited to 'apt-pkg/contrib/configuration.cc')
-rw-r--r-- | apt-pkg/contrib/configuration.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/apt-pkg/contrib/configuration.cc b/apt-pkg/contrib/configuration.cc index 3109fd7a5..e8301d918 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 /*{{{*/ |