#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>
{
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
int main(int, char *argv[])
{
- setlocale(LC_ALL, "");
-
- StoreMethod Mth(flNotDir(argv[0]));
- return Mth.Run();
+ return StoreMethod(flNotDir(argv[0])).Run();
}