]> git.saurik.com Git - apt.git/blobdiff - methods/store.cc
eipp: properly handle arch-specific provides
[apt.git] / methods / store.cc
index 29cf9e947d012883cda7a3fd3dadec6d66a12ae9..934e1a188bcb751c47a702687d0b5be118f0eca3 100644 (file)
@@ -14,7 +14,6 @@
 #include <config.h>
 
 #include <apt-pkg/configuration.h>
-#include <apt-pkg/acquire-method.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/hashes.h>
@@ -73,7 +72,7 @@ bool StoreMethod::Fetch(FetchItem *Itm)                                       /*{{{*/
    {
       if (OpenFileWithCompressorByName(From, Path, FileFd::ReadOnly, Prog) == false)
         return false;
-      if(From.FileSize() == 0)
+      if(From.IsCompressed() && From.FileSize() == 0)
         return _error->Error(_("Empty files can't be valid archives"));
    }
    else
@@ -152,8 +151,5 @@ bool StoreMethod::Fetch(FetchItem *Itm)                                     /*{{{*/
 
 int main(int, char *argv[])
 {
-   setlocale(LC_ALL, "");
-
-   StoreMethod Mth(flNotDir(argv[0]));
-   return Mth.Run();
+   return StoreMethod(flNotDir(argv[0])).Run();
 }