]> git.saurik.com Git - apt.git/blobdiff - methods/mirror.cc
allow arch=all to override No-Support-for-Architecture-all
[apt.git] / methods / mirror.cc
index d3aef91bcd3d68054a96754152f418b463d09d8f..9d900771be8255c1b926e604727646307c1aca84 100644 (file)
@@ -12,7 +12,6 @@
 
 #include <apt-pkg/aptconfiguration.h>
 #include <apt-pkg/fileutl.h>
-#include <apt-pkg/acquire-method.h>
 #include <apt-pkg/acquire-item.h>
 #include <apt-pkg/acquire.h>
 #include <apt-pkg/error.h>
@@ -106,6 +105,7 @@ bool MirrorMethod::Clean(string Dir)
       // Skip some files..
       if (strcmp(Dir->d_name,"lock") == 0 ||
          strcmp(Dir->d_name,"partial") == 0 ||
+         strcmp(Dir->d_name,"lost+found") == 0 ||
          strcmp(Dir->d_name,".") == 0 ||
          strcmp(Dir->d_name,"..") == 0)
         continue;
@@ -122,7 +122,7 @@ bool MirrorMethod::Clean(string Dir)
       }
       // nothing found, nuke it
       if (I == list.end())
-        unlink(Dir->d_name);
+        RemoveFile("mirror", Dir->d_name);
    }
 
    closedir(D);
@@ -464,11 +464,7 @@ void MirrorMethod::URIDone(FetchResult &Res,FetchResult *Alt)
 
 int main()
 {
-   setlocale(LC_ALL, "");
-
-   MirrorMethod Mth;
-
-   return Mth.Loop();
+   return MirrorMethod().Loop();
 }