From: david-sarah Date: Sun, 30 May 2010 06:01:27 +0000 (-0700) Subject: SFTP: the same bug as in _sync_heisenfiles also occurred in two other places. X-Git-Url: https://git.rkrishnan.org/vdrive/%22news.html/-?a=commitdiff_plain;h=9faa02deb5f3f5207ae8244b73a5c6c80dc8ee2b;p=tahoe-lafs%2Ftahoe-lafs.git SFTP: the same bug as in _sync_heisenfiles also occurred in two other places. --- diff --git a/src/allmydata/frontends/sftpd.py b/src/allmydata/frontends/sftpd.py index dda7b5cc..c6c5eaa0 100644 --- a/src/allmydata/frontends/sftpd.py +++ b/src/allmydata/frontends/sftpd.py @@ -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