From: david-sarah Date: Sun, 30 May 2010 05:52:54 +0000 (-0700) Subject: SFTP: another try at fixing the _sync_heisenfiles bug. X-Git-Url: https://git.rkrishnan.org/nxhtml.html?a=commitdiff_plain;h=cccdd328062cd9eec2739286ff0d48c5f3d91d97;p=tahoe-lafs%2Ftahoe-lafs.git SFTP: another try at fixing the _sync_heisenfiles bug. --- diff --git a/src/allmydata/frontends/sftpd.py b/src/allmydata/frontends/sftpd.py index 9115dcb1..dda7b5cc 100644 --- a/src/allmydata/frontends/sftpd.py +++ b/src/allmydata/frontends/sftpd.py @@ -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)