summaryrefslogtreecommitdiff
path: root/apt-pkg/init.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@ubuntu.com>2014-04-01 12:28:56 +0200
committerMichael Vogt <mvo@ubuntu.com>2014-04-01 12:28:56 +0200
commitbe20eef52da4b7f361333ea70a8d705a98ae779e (patch)
tree4177a110ce6b1335fc4b85d5e53b298a65661f39 /apt-pkg/init.cc
parenta555cf8be53d8b5557f004ecbde8482a169b79f3 (diff)
parent21b3eac8f9ab8e12b43fa8998a5aa5465f29adc5 (diff)
Merge remote-tracking branch 'upstream/debian/sid' into feature/apt-manpage
Conflicts: cmdline/apt.cc
Diffstat (limited to 'apt-pkg/init.cc')
-rw-r--r--apt-pkg/init.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/apt-pkg/init.cc b/apt-pkg/init.cc
index 81b601a7f..3a35f852e 100644
--- a/apt-pkg/init.cc
+++ b/apt-pkg/init.cc
@@ -15,9 +15,11 @@
#include <apt-pkg/error.h>
#include <apt-pkg/pkgsystem.h>
#include <apt-pkg/configuration.h>
+#include <apt-pkg/macros.h>
+#include <string.h>
+#include <string>
#include <cstdlib>
-#include <sys/stat.h>
#include <apti18n.h>
/*}}}*/
@@ -92,7 +94,7 @@ bool pkgInitConfig(Configuration &Cnf)
// Read an alternate config file
const char *Cfg = getenv("APT_CONFIG");
- if (Cfg != 0)
+ if (Cfg != 0 && strlen(Cfg) != 0)
{
if (RealFileExists(Cfg) == true)
Res &= ReadConfigFile(Cnf,Cfg);