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/module-simplejson-index.html?a=commitdiff_plain;h=4a16bf7bb57e6ce54e2bf4a9f8b9968f591b6291;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):