summaryrefslogtreecommitdiff
path: root/apt-inst
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2014-02-16 23:29:13 +0100
committerMichael Vogt <mvo@debian.org>2014-02-22 20:06:41 +0100
commit3255db2d02358e0026c3e6d0d8cc1519bcd48faf (patch)
treeeff99c81e33a7006064bf134872e30184ddddf9f /apt-inst
parentbef4b142853642db669f6ffea54fa52c9b52cd95 (diff)
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')
-rw-r--r--apt-inst/contrib/extracttar.cc6
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"));