From 40607ad5ce42aadb38974d7d087a5cf4dcee6676 Mon Sep 17 00:00:00 2001 From: Daira Hopwood Date: Tue, 27 Oct 2015 17:09:40 +0000 Subject: [PATCH] Distinguish deletion of directories. Signed-off-by: Daira Hopwood --- src/allmydata/frontends/magic_folder.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/allmydata/frontends/magic_folder.py b/src/allmydata/frontends/magic_folder.py index e6661c9e..96156f60 100644 --- a/src/allmydata/frontends/magic_folder.py +++ b/src/allmydata/frontends/magic_folder.py @@ -705,9 +705,12 @@ class Downloader(QueueMixin, WriteFileMixin): #local_last_uploaded_uri = ... if relpath_u.endswith(u"/"): - self._log("mkdir(%r)" % (abspath_u,)) - d.addCallback(lambda ign: fileutil.make_dirs(abspath_u)) - d.addCallback(lambda ign: abspath_u) + if metadata.get('deleted', False): + self._log("rmdir(%r) ignored" % (abspath_u,)) + else: + self._log("mkdir(%r)" % (abspath_u,)) + d.addCallback(lambda ign: fileutil.make_dirs(abspath_u)) + d.addCallback(lambda ign: abspath_u) else: d.addCallback(lambda ign: file_node.download_best_version()) if metadata.get('deleted', False): -- 2.45.2