X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/d3e8fbb395f57954acd7a2095f02ce530a05ec6a..62600666d21aacea63cece3b4ec64f0ffb40168b:/methods/mirror.cc diff --git a/methods/mirror.cc b/methods/mirror.cc index 977eddcf5..9d900771b 100644 --- a/methods/mirror.cc +++ b/methods/mirror.cc @@ -12,22 +12,21 @@ #include #include -#include #include #include #include -#include #include #include #include +#include +#include +#include +#include #include -#include #include - -#include +#include #include -#include #include #include @@ -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); @@ -132,7 +132,7 @@ bool MirrorMethod::Clean(string Dir) } -bool MirrorMethod::DownloadMirrorFile(string mirror_uri_str) +bool MirrorMethod::DownloadMirrorFile(string /*mirror_uri_str*/) { // not that great to use pkgAcquire here, but we do not have // any other way right now @@ -464,11 +464,7 @@ void MirrorMethod::URIDone(FetchResult &Res,FetchResult *Alt) int main() { - setlocale(LC_ALL, ""); - - MirrorMethod Mth; - - return Mth.Loop(); + return MirrorMethod().Loop(); }