summaryrefslogtreecommitdiff
path: root/methods/gzip.cc
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:57:12 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:57:12 +0000
commit678bc33eaf95356d1b63090d220b65162478b89a (patch)
tree8e5ab6fadf5d8d94aa16fbb2f05feb001ca0b841 /methods/gzip.cc
parentf3bab4fd4525bf5f7401a261ce24dbea70a6c479 (diff)
BSD testing fixes
Author: jgg Date: 2001-03-11 05:30:20 GMT BSD testing fixes
Diffstat (limited to 'methods/gzip.cc')
-rw-r--r--methods/gzip.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/methods/gzip.cc b/methods/gzip.cc
index 4a52c7a0c..c0092c755 100644
--- a/methods/gzip.cc
+++ b/methods/gzip.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: gzip.cc,v 1.12 2001/03/06 07:15:29 jgg Exp $
+// $Id: gzip.cc,v 1.13 2001/03/11 05:30:20 jgg Exp $
/* ######################################################################
GZip method - Take a file URI in and decompress it into the target
@@ -34,7 +34,8 @@ class GzipMethod : public pkgAcqMethod
// GzipMethod::Fetch - Decompress the passed URI /*{{{*/
// ---------------------------------------------------------------------
-/* */
+/* This forks gzip and hashes the resulting decompressed output as it
+ flows to the destination file */
bool GzipMethod::Fetch(FetchItem *Itm)
{
URI Get = Itm->Uri;
@@ -102,7 +103,11 @@ bool GzipMethod::Fetch(FetchItem *Itm)
break;
Hash.Add(Buffer,Count);
- To.Write(Buffer,Count);
+ if (To.Write(Buffer,Count) == false)
+ {
+ Failed = true;
+ break;
+ }
}
// Wait for gzip to finish