summaryrefslogtreecommitdiff
path: root/apt-pkg/sourcelist.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/sourcelist.cc')
-rw-r--r--apt-pkg/sourcelist.cc14
1 files changed, 10 insertions, 4 deletions
diff --git a/apt-pkg/sourcelist.cc b/apt-pkg/sourcelist.cc
index a25358bf2..e20ec4704 100644
--- a/apt-pkg/sourcelist.cc
+++ b/apt-pkg/sourcelist.cc
@@ -8,15 +8,17 @@
##################################################################### */
/*}}}*/
// Include Files /*{{{*/
+#include<config.h>
+
#include <apt-pkg/sourcelist.h>
#include <apt-pkg/error.h>
#include <apt-pkg/fileutl.h>
#include <apt-pkg/strutl.h>
#include <apt-pkg/configuration.h>
-#include <apti18n.h>
-
#include <fstream>
+
+#include <apti18n.h>
/*}}}*/
using namespace std;
@@ -346,10 +348,14 @@ bool pkgSourceList::ReadSourceDir(string Dir)
/* */
time_t pkgSourceList::GetLastModifiedTime()
{
- // go over the parts
+ vector<string> List;
+
string Main = _config->FindFile("Dir::Etc::sourcelist");
string Parts = _config->FindDir("Dir::Etc::sourceparts");
- vector<string> const List = GetListOfFilesInDir(Parts, "list", true);
+
+ // go over the parts
+ if (DirectoryExists(Parts) == true)
+ List = GetListOfFilesInDir(Parts, "list", true);
// calculate the time
time_t mtime_sources = GetModificationTime(Main);