summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/configuration.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/contrib/configuration.cc')
-rw-r--r--apt-pkg/contrib/configuration.cc15
1 files changed, 12 insertions, 3 deletions
diff --git a/apt-pkg/contrib/configuration.cc b/apt-pkg/contrib/configuration.cc
index 2db191ba2..36866a35a 100644
--- a/apt-pkg/contrib/configuration.cc
+++ b/apt-pkg/contrib/configuration.cc
@@ -15,16 +15,19 @@
##################################################################### */
/*}}}*/
// Include files /*{{{*/
+#include <config.h>
+
#include <apt-pkg/configuration.h>
#include <apt-pkg/error.h>
#include <apt-pkg/strutl.h>
#include <apt-pkg/fileutl.h>
-#include <apti18n.h>
#include <vector>
#include <fstream>
#include <iostream>
+#include <apti18n.h>
+
using namespace std;
/*}}}*/
@@ -182,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;