]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
SFTP: fix a bug that caused the temporary files underlying EncryptedTemporaryFiles...
authordavid-sarah <david-sarah@jacaranda.org>
Tue, 1 Jun 2010 05:53:10 +0000 (22:53 -0700)
committerdavid-sarah <david-sarah@jacaranda.org>
Tue, 1 Jun 2010 05:53:10 +0000 (22:53 -0700)
src/allmydata/frontends/sftpd.py

index 3ba07146429029b6f63efcf12bf4279dd8132650..a624dddcb3bae1922e039f8abc2cf78c9b59083c 100644 (file)
@@ -557,13 +557,13 @@ class OverwriteableFileConsumer(PrefixingLogMixin):
         #self.unregisterProducer()
 
     def close(self):
-        self.is_closed = True
-        self.finish()
         if not self.is_closed:
+            self.is_closed = True
             try:
                 self.f.close()
             except BaseException as e:
                 self.log("suppressed %r from close of temporary file %r" % (e, self.f), level=WEIRD)
+        self.finish()
 
     def unregisterProducer(self):
         if self.producer: