mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-08 19:34:18 +00:00
fix getchild for directory
This commit is contained in:
parent
8f32936c7a
commit
71c97369f0
@ -116,12 +116,15 @@ class DirectoryNodeHandler(ReplaceMeMixin, Resource, object):
|
||||
"""
|
||||
Dynamically create a child for the given request and 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'))
|
||||
if self.name is None:
|
||||
return self
|
||||
name = name.decode("utf-8")
|
||||
if not name:
|
||||
raise EmptyPathnameComponentError()
|
||||
d = self.node.get(name)
|
||||
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…
x
Reference in New Issue
Block a user