summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/configuration.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2012-01-30 13:13:29 +0100
committerDavid Kalnischkies <kalnischkies@gmail.com>2012-01-30 13:13:29 +0100
commit017f9fd68258b15ac4df5ae73b19ba6653711022 (patch)
tree77abdd6251d49b1a26f4f3cdefac7618aa511381 /apt-pkg/contrib/configuration.cc
parent9535a4db891b629dc17354171bce0a0f41e48d4a (diff)
* apt-pkg/contrib/configuration.cc:
- do not stop parent transversal in FindDir if the value is empty See http://lists.debian.org/deity/2012/01/msg00053.html , too.
Diffstat (limited to 'apt-pkg/contrib/configuration.cc')
-rw-r--r--apt-pkg/contrib/configuration.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/apt-pkg/contrib/configuration.cc b/apt-pkg/contrib/configuration.cc
index 0949ec223..36866a35a 100644
--- a/apt-pkg/contrib/configuration.cc
+++ b/apt-pkg/contrib/configuration.cc
@@ -185,8 +185,14 @@ string Configuration::FindFile(const char *Name,const char *Default) const
}
string val = Itm->Value;
- while (Itm->Parent != 0 && Itm->Parent->Value.empty() == false)
- {
+ while (Itm->Parent != 0)
+ {
+ if (Itm->Parent->Value.empty() == true)
+ {
+ Itm = Itm->Parent;
+ continue;
+ }
+
// Absolute
if (val.length() >= 1 && val[0] == '/')
break;