From: Daira Hopwood Date: Tue, 22 Sep 2015 15:45:34 +0000 (+0100) Subject: Make sure that a path is in the pending set before calling Uploader._process on it. X-Git-Url: https://git.rkrishnan.org/Site/Content/Exhibitors/provisioning?a=commitdiff_plain;h=7e38813c6b7284b3796ce63f19063c4b5a1e6c99;p=tahoe-lafs%2Ftahoe-lafs.git Make sure that a path is in the pending set before calling Uploader._process on it. Signed-off-by: Daira Hopwood --- diff --git a/src/allmydata/frontends/magic_folder.py b/src/allmydata/frontends/magic_folder.py index 7b40708f..59087ca0 100644 --- a/src/allmydata/frontends/magic_folder.py +++ b/src/allmydata/frontends/magic_folder.py @@ -248,6 +248,10 @@ class Uploader(QueueMixin): for child in children: assert isinstance(child, unicode), child d.addCallback(lambda ign, child=child: os.path.join(reldir_u, child)) + def _add_pending(relpath_u): + self._pending.add(relpath_u) + return relpath_u + d.addCallback(_add_pending) d.addCallback(self._process) d.addErrback(log.err)