diff options
author | Guillem Jover <guillem@debian.org> | 2014-02-16 23:29:13 +0100 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2014-02-22 20:06:41 +0100 |
commit | 3255db2d02358e0026c3e6d0d8cc1519bcd48faf (patch) | |
tree | eff99c81e33a7006064bf134872e30184ddddf9f /apt-inst/contrib | |
parent | bef4b142853642db669f6ffea54fa52c9b52cd95 (diff) | |
download | apt-3255db2d02358e0026c3e6d0d8cc1519bcd48faf.tar.gz |
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.
Diffstat (limited to 'apt-inst/contrib')
-rw-r--r-- | apt-inst/contrib/extracttar.cc | 6 |
1 files changed, 6 insertions, 0 deletions
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")); |