diff options
author | Peter Palfrader <peter@palfrader.org> | 2004-06-15 10:17:14 +0000 |
---|---|---|
committer | Peter Palfrader <peter@palfrader.org> | 2004-06-15 10:17:14 +0000 |
commit | fb251b65079b0545417fc8c351d6caeb0e096263 (patch) | |
tree | 875900cf2285254faf0cd50bf1577589593ce0d5 /Echolot | |
parent | e8683a54e9a204e92db3823b228fb8308f6b3a61 (diff) |
Also do not continue if the syswrite failed.
Diffstat (limited to 'Echolot')
-rw-r--r-- | Echolot/Tools.pm | 15 |
1 files changed, 8 insertions, 7 deletions
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; + } } } |