aboutsummaryrefslogtreecommitdiffstats
path: root/Packdrakeng
diff options
context:
space:
mode:
authorOlivier Thauvin <nanardon@mandriva.org>2004-12-21 23:14:57 +0000
committerOlivier Thauvin <nanardon@mandriva.org>2004-12-21 23:14:57 +0000
commitc8c828186a49bd86f5478245d61fe0d8ce9014a1 (patch)
treeb3bc05b343e22cd41159a82c97332db16c8f56b9 /Packdrakeng
parent9118ef2b3fb1053b9a9c7f8073a8810120be9502 (diff)
downloadrpmtools-c8c828186a49bd86f5478245d61fe0d8ce9014a1.tar
rpmtools-c8c828186a49bd86f5478245d61fe0d8ce9014a1.tar.gz
rpmtools-c8c828186a49bd86f5478245d61fe0d8ce9014a1.tar.bz2
rpmtools-c8c828186a49bd86f5478245d61fe0d8ce9014a1.tar.xz
rpmtools-c8c828186a49bd86f5478245d61fe0d8ce9014a1.zip
-really fix syswrite
Diffstat (limited to 'Packdrakeng')
-rw-r--r--Packdrakeng/zlib.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/Packdrakeng/zlib.pm b/Packdrakeng/zlib.pm
index 6d33d3e..03673d2 100644
--- a/Packdrakeng/zlib.pm
+++ b/Packdrakeng/zlib.pm
@@ -59,7 +59,8 @@ sub gzip_compress {
while (my $lenght = sysread($sourcefh, my $buf, $pack->{bufsize})) {
$pack->{cstream_data}{crc} = crc32($buf, $pack->{cstream_data}{crc});
my ($cbuf, $status) = $pack->{cstream_data}{object}->deflate($buf);
- my $wres = syswrite($pack->{handle}, $cbuf) == length($cbuf) or do {
+ my $wres = syswrite($pack->{handle}, $cbuf) || 0;
+ $wres == length($cbuf) or do {
warn "can't push all data to compressor";
return 0, 0;
};