From fb251b65079b0545417fc8c351d6caeb0e096263 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Tue, 15 Jun 2004 10:17:14 +0000 Subject: Also do not continue if the syswrite failed. --- Echolot/Tools.pm | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'Echolot') diff --git a/Echolot/Tools.pm b/Echolot/Tools.pm index 425180c..018f958 100644 --- a/Echolot/Tools.pm +++ b/Echolot/Tools.pm @@ -330,13 +330,14 @@ sub readwrite_gpg($$$$$) { close $wfd; $sin->remove($wfd); $sin = undef; - }; - $offset += $written; - if ($offset == length($in)) { - Echolot::Log::trace("writing to $wfd done."); - close $wfd; - $sin->remove($wfd); - $sin = undef; + } else { + $offset += $written; + if ($offset == length($in)) { + Echolot::Log::trace("writing to $wfd done."); + close $wfd; + $sin->remove($wfd); + $sin = undef; + } } } -- cgit v1.2.3