From 17b3813cfad54b0ef14e70ad71e2d3ba49abfafe Mon Sep 17 00:00:00 2001 From: Daniel Burrows Date: Fri, 6 Mar 2009 08:22:53 -0800 Subject: Fix FindFile (and FindDir) so that the value of RootDir is applied to the default if no value is found. Previously FindFile("Dir::etc", "/etc") would use RootDir if a value existed for "Dir::etc"; otherwise it would go ahead and use "/etc", ignoring RootDir. Of course, this made RootDir fairly useless; it has now been fixed. --- apt-pkg/contrib/configuration.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/contrib/configuration.cc b/apt-pkg/contrib/configuration.cc index 7326b84ea..a82311a3f 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; -- cgit v1.2.3