X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/ab588494d571f7bd30a0f525864241c760ab74fa..ea54214002c09eeb4dd498d97a564471ec9993c5:/methods/gzip.cc diff --git a/methods/gzip.cc b/methods/gzip.cc index 22cae9424..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.Size() == 0) - return false; + if(From.FileSize() == 0) + return _error->Error(_("Empty files can't be valid archives")); FileFd To(Itm->DestFile,FileFd::WriteAtomic); To.EraseOnFailure();