summaryrefslogtreecommitdiff
path: root/methods/gzip.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2011-01-26 16:19:30 +0100
committerDavid Kalnischkies <kalnischkies@gmail.com>2011-01-26 16:19:30 +0100
commit5d88572318ed7e271101b1ae8f2cc139a1a3f705 (patch)
treed6185078bc008b9d300692c554f8aac27e9e3c73 /methods/gzip.cc
parent18331adf730dca4a587f99605edff71436379ea6 (diff)
- change the internal handling of Extensions in pkgAcqIndex
- add a special uncompressed compression type to prefer those files * methods/{gzip,bzip}.cc: - print a good error message if FileSize() is zero
Diffstat (limited to 'methods/gzip.cc')
-rw-r--r--methods/gzip.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/methods/gzip.cc b/methods/gzip.cc
index f1c76066e..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.FileSize() == 0)
- return false;
+ return _error->Error(_("Empty files can't be valid archives"));
FileFd To(Itm->DestFile,FileFd::WriteAtomic);
To.EraseOnFailure();