summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
+ }
}
}