]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/sourcelist.cc
merged from donkult
[apt.git] / apt-pkg / sourcelist.cc
index a25358bf289784189e770602a4f325905514a943..46025fc7487d58fb49666cee42be0e086d4b3e97 100644 (file)
@@ -8,15 +8,19 @@
    ##################################################################### */
                                                                        /*}}}*/
 // 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 <apt-pkg/metaindex.h>
+#include <apt-pkg/indexfile.h>
 
 #include <fstream>
+
+#include <apti18n.h>
                                                                        /*}}}*/
 
 using namespace std;
@@ -346,10 +350,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);