From 3255db2d02358e0026c3e6d0d8cc1519bcd48faf Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Sun, 16 Feb 2014 23:29:13 +0100 Subject: ExtractTar: Allow an empty decompressor program This allows for uncompressed tar files, as the decompressor process will not get interposed in-between the file descriptors. --- apt-inst/contrib/extracttar.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'apt-inst') diff --git a/apt-inst/contrib/extracttar.cc b/apt-inst/contrib/extracttar.cc index 2437c9749..41301d1a6 100644 --- a/apt-inst/contrib/extracttar.cc +++ b/apt-inst/contrib/extracttar.cc @@ -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")); -- cgit v1.2.3