X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/4260fd3972cc0c01e6cbc825063c06311d440f9b..ea54214002c09eeb4dd498d97a564471ec9993c5:/methods/gzip.cc?ds=sidebyside diff --git a/methods/gzip.cc b/methods/gzip.cc index f1c76066e..6202d73dc 100644 --- a/methods/gzip.cc +++ b/methods/gzip.cc @@ -9,6 +9,8 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include + #include #include #include @@ -48,9 +50,8 @@ bool GzipMethod::Fetch(FetchItem *Itm) // Open the source and destination files FileFd From(Path,FileFd::ReadOnlyGzip); - // FIXME add an error message saying that empty files can't be valid archives if(From.FileSize() == 0) - return false; + return _error->Error(_("Empty files can't be valid archives")); FileFd To(Itm->DestFile,FileFd::WriteAtomic); To.EraseOnFailure();