]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
The initial_children= argument to nodemaker.create_new_mutable_directory is
authorBrian Warner <warner@lothar.com>
Tue, 13 Oct 2009 03:19:22 +0000 (20:19 -0700)
committerBrian Warner <warner@lothar.com>
Tue, 13 Oct 2009 03:19:22 +0000 (20:19 -0700)
now enabled.

src/allmydata/dirnode.py
src/allmydata/nodemaker.py

index ba6d55280a25a4d91df8e462bbf9d94b714b103f..dfb2f1b5c04afa386510cadace62b4046bfb1e70 100644 (file)
@@ -479,9 +479,7 @@ class DirectoryNode:
         assert isinstance(name, unicode)
         if self.is_readonly():
             return defer.fail(NotMutableError())
-        d = self._nodemaker.create_new_mutable_directory()
-        if initial_children:
-            d.addCallback(lambda n: n.set_children(initial_children))
+        d = self._nodemaker.create_new_mutable_directory(initial_children)
         def _created(child):
             entries = [(name, child, None)]
             a = Adder(self, entries, overwrite=overwrite)
index 01fdd72ab9f7a4565447358222e3873b753a9ac1..8a0baf435e84e5133ccd725321f82df263a225bb 100644 (file)
@@ -89,8 +89,8 @@ class NodeMaker:
         return d
 
     def create_new_mutable_directory(self, initial_children={}):
-        if initial_children:
-            raise NotImplementedError("initial_children= not implemented yet")
         d = self.create_mutable_file()
         d.addCallback(self._create_dirnode)
+        if initial_children:
+            d.addCallback(lambda n: n.set_children(initial_children))
         return d