summaryrefslogtreecommitdiff
path: root/apt-inst/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'apt-inst/contrib')
-rw-r--r--apt-inst/contrib/arfile.cc2
-rw-r--r--apt-inst/contrib/extracttar.cc8
2 files changed, 8 insertions, 2 deletions
diff --git a/apt-inst/contrib/arfile.cc b/apt-inst/contrib/arfile.cc
index 9d84c1784..77dbc55d6 100644
--- a/apt-inst/contrib/arfile.cc
+++ b/apt-inst/contrib/arfile.cc
@@ -6,7 +6,7 @@
AR File - Handle an 'AR' archive
AR Archives have plain text headers at the start of each file
- section. The headers are aligned on a 2 byte boundry.
+ section. The headers are aligned on a 2 byte boundary.
Information about the structure of AR files can be found in ar(5)
on a BSD system, or in the binutils source.
diff --git a/apt-inst/contrib/extracttar.cc b/apt-inst/contrib/extracttar.cc
index fb4db42f8..41301d1a6 100644
--- a/apt-inst/contrib/extracttar.cc
+++ b/apt-inst/contrib/extracttar.cc
@@ -6,7 +6,7 @@
Extract a Tar - Tar Extractor
Some performance measurements showed that zlib performed quite poorly
- in comparision to a forked gzip process. This tar extractor makes use
+ in comparison to a forked gzip process. This tar extractor makes use
of the fact that dup'd file descriptors have the same seek pointer
and that gzip will not read past the end of a compressed stream,
even if there is more data. We use the dup property to track extraction
@@ -111,6 +111,12 @@ bool ExtractTar::Done(bool Force)
gzip will efficiently ignore the extra bits. */
bool ExtractTar::StartGzip()
{
+ if (DecompressProg.empty())
+ {
+ InFd.OpenDescriptor(File.Fd(), FileFd::ReadOnly, FileFd::None, false);
+ return true;
+ }
+
int Pipes[2];
if (pipe(Pipes) != 0)
return _error->Errno("pipe",_("Failed to create pipes"));