summaryrefslogtreecommitdiff
path: root/Echolot
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2004-06-15 10:17:14 +0000
committerPeter Palfrader <peter@palfrader.org>2004-06-15 10:17:14 +0000
commitfb251b65079b0545417fc8c351d6caeb0e096263 (patch)
tree875900cf2285254faf0cd50bf1577589593ce0d5 /Echolot
parente8683a54e9a204e92db3823b228fb8308f6b3a61 (diff)
Also do not continue if the syswrite failed.
Diffstat (limited to 'Echolot')
-rw-r--r--Echolot/Tools.pm15
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;
+ }
}
}