From 3d4eb1b430aa26e7e67596519cdaefd2cbefa663 Mon Sep 17 00:00:00 2001 From: Daira Hopwood Date: Tue, 22 Sep 2015 16:45:34 +0100 Subject: [PATCH] Make sure that a path is in the pending set before calling Uploader._process on it. Signed-off-by: Daira Hopwood --- src/allmydata/frontends/magic_folder.py | 4 ++++ 1 file changed, 4 insertions(+) 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) -- 2.45.2