X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/cf1cdb3328dacde829db8bbb3db4f5373ac07d61..0a64ecd792b4caca519d597a69b8baeda6a1bf77:/methods/gzip.cc diff --git a/methods/gzip.cc b/methods/gzip.cc index 22cae9424..fc4e1ecfd 100644 --- a/methods/gzip.cc +++ b/methods/gzip.cc @@ -48,9 +48,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();