reorder includes: add <config.h> if needed and include it at first
[ntk/apt.git] / apt-pkg / sourcelist.cc
index c3ec986..d4eec5c 100644 (file)
@@ -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;
@@ -197,7 +199,7 @@ bool pkgSourceList::ReadMainList()
    string Main = _config->FindFile("Dir::Etc::sourcelist");
    string Parts = _config->FindDir("Dir::Etc::sourceparts");
    
-   if (FileExists(Main) == true)
+   if (RealFileExists(Main) == true)
       Res &= ReadAppend(Main);
    else if (DirectoryExists(Parts) == false)
       // Only warn if there are no sources.list.d.
@@ -205,9 +207,9 @@ bool pkgSourceList::ReadMainList()
 
    if (DirectoryExists(Parts) == true)
       Res &= ReadSourceDir(Parts);
-   else if (FileExists(Main) == false)
+   else if (RealFileExists(Main) == false)
       // Only warn if there is no sources.list file.
-      _error->WarningE("FileExists", _("Unable to read %s"), Main.c_str());
+      _error->WarningE("RealFileExists", _("Unable to read %s"), Main.c_str());
 
    return Res;
 }