]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
SFTP: the same bug as in _sync_heisenfiles also occurred in two other places.
authordavid-sarah <david-sarah@jacaranda.org>
Sun, 30 May 2010 06:01:27 +0000 (23:01 -0700)
committerdavid-sarah <david-sarah@jacaranda.org>
Sun, 30 May 2010 06:01:27 +0000 (23:01 -0700)
src/allmydata/frontends/sftpd.py

index dda7b5ccd6178921a06cf0a1f6a6d233319b06bb..c6c5eaa026bac3728714f3a579789af4ad0f1ce2 100644 (file)
@@ -1014,7 +1014,9 @@ class SFTPUserHandler(ConchUser, PrefixingLogMixin):
 
         d = defer.succeed(None)
         for f in files:
-            d.addBoth(lambda ign: f.sync())
+            def _sync(ign, current_f):
+                return current_f.sync()
+            d.addBoth(_sync, f)
 
         d.addBoth(lambda ign: len(files) > 0)
         return d
@@ -1074,7 +1076,9 @@ class SFTPUserHandler(ConchUser, PrefixingLogMixin):
 
         d = defer.succeed(None)
         for f in from_files:
-            d.addBoth(lambda ign: f.sync())
+            def _sync(ign, current_f):
+                return current_f.sync()
+            d.addBoth(_sync, f)
 
         d.addBoth(lambda ign: len(from_files) > 0)
         return d