]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
SFTP: another try at fixing the _sync_heisenfiles bug.
authordavid-sarah <david-sarah@jacaranda.org>
Sun, 30 May 2010 05:52:54 +0000 (22:52 -0700)
committerdavid-sarah <david-sarah@jacaranda.org>
Sun, 30 May 2010 05:52:54 +0000 (22:52 -0700)
src/allmydata/frontends/sftpd.py

index 9115dcb1946fa84ec7ef8c8c05f2f888569a8f77..dda7b5ccd6178921a06cf0a1f6a6d233319b06bb 100644 (file)
@@ -1094,10 +1094,10 @@ class SFTPUserHandler(ConchUser, PrefixingLogMixin):
         d = defer.succeed(None)
         for f in files:
             if not (f is ignore):
-                def _sync(ign):
-                    if noisy: self.log("_sync %r in %r" % (f, request), level=NOISY)
-                    return f.sync()
-                d.addBoth(_sync)
+                def _sync(ign, current_f):
+                    if noisy: self.log("_sync %r in %r" % (current_f, request), level=NOISY)
+                    return current_f.sync()
+                d.addBoth(_sync, f)
 
         def _done(ign):
             self.log("done %r" % (request,), level=OPERATIONAL)