mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-29 17:28:53 +00:00
Revert "fix getchild for directory"
This reverts commit 8f00f4d4ab2e7edd0ad60a6144e858ece4a4be1f.
This commit is contained in:
parent
247fc54f8c
commit
921926239a
@ -107,15 +107,12 @@ class DirectoryNodeHandler(ReplaceMeMixin, Resource, object):
|
||||
"""
|
||||
Dynamically create a child for the given request and name
|
||||
"""
|
||||
if self.name is None:
|
||||
return self
|
||||
name = name.decode("utf-8")
|
||||
if not name:
|
||||
raise EmptyPathnameComponentError()
|
||||
d = self.node.get(name)
|
||||
# XXX can we do this with putChild() instead? (i.e. does it
|
||||
# HAVE to be dynamic?)
|
||||
if name is None:
|
||||
name = get_arg(req, "uri")
|
||||
d = self.node.get(name.decode('utf8'))
|
||||
d.addBoth(self._got_child, req, name)
|
||||
# got_child returns a handler resource: FileNodeHandler or
|
||||
# DirectoryNodeHandler
|
||||
return d
|
||||
|
||||
def _got_child(self, node_or_failure, req, name):
|
||||
|
Loading…
Reference in New Issue
Block a user