]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Distinguish deletion of directories.
authorDaira Hopwood <daira@jacaranda.org>
Tue, 27 Oct 2015 17:09:40 +0000 (17:09 +0000)
committerDaira Hopwood <daira@jacaranda.org>
Mon, 28 Dec 2015 16:18:53 +0000 (16:18 +0000)
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
src/allmydata/frontends/magic_folder.py

index e6661c9e44b291a24bb44f4c5c8830e2755c0bb3..96156f60e9693c47ba0c8f6266c0262d02a2eaf9 100644 (file)
@@ -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):