aboutsummaryrefslogtreecommitdiffstats
path: root/Packdrakeng.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Packdrakeng.pm')
-rw-r--r--Packdrakeng.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/Packdrakeng.pm b/Packdrakeng.pm
index 38ff2d8..f46c2b6 100644
--- a/Packdrakeng.pm
+++ b/Packdrakeng.pm
@@ -398,7 +398,10 @@ sub extern_uncompress {
}
close($tempfh);
- CORE::open($pack->{ustream_data}{handle}, "cat '$pack->{ustream_data}{tempname}' | $pack->{uncompress_method} |") or do {
+ my $cmd = $pack->{uncompress_method} eq 'gzip -d' || $pack->{uncompress_method} eq 'bzip2 -d' ?
+ "$pack->{uncompress_method} -c '$pack->{ustream_data}{tempname}'" :
+ "$pack->{uncompress_method} < '$pack->{ustream_data}{tempname}'";
+ CORE::open($pack->{ustream_data}{handle}, "$cmd |") or do {
$pack->{log}("Can't start $pack->{uncompress_method} to uncompress data");
unlink($pack->{ustream_data}{tempname});
$pack->{ustream_data} = undef;