From: Daira Hopwood Date: Tue, 27 Oct 2015 17:09:40 +0000 (+0000) Subject: Distinguish deletion of directories. X-Git-Url: https://git.rkrishnan.org/pf/content/it.html?a=commitdiff_plain;h=f254859b2db52eb51c6b916d9b322c69c33cce96;p=tahoe-lafs%2Ftahoe-lafs.git Distinguish deletion of directories. Signed-off-by: Daira Hopwood --- 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):