mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-19 13:07:56 +00:00
WUI: fix display of empty directories, it threw an exception before
This commit is contained in:
parent
4f4d748fd9
commit
6599eae6f9
@ -914,6 +914,12 @@ class Web(WebMixin, WebErrorMixin, testutil.StallMixin, unittest.TestCase):
|
||||
'</td>\s+<td>DIR-RO</td>', res))
|
||||
d.addCallback(_check3)
|
||||
|
||||
# and an empty directory
|
||||
d.addCallback(lambda res: self.GET(self.public_url + "/foo/empty/"))
|
||||
def _check4(res):
|
||||
self.failUnless("directory is empty!" in res, res)
|
||||
d.addCallback(_check4)
|
||||
|
||||
return d
|
||||
|
||||
def test_GET_DIRURL_badtype(self):
|
||||
|
@ -550,7 +550,7 @@ class DirectoryAsHTML(rend.Page):
|
||||
def render_try_children(self, ctx, data):
|
||||
# if the dirnode can be retrived, render a table of children.
|
||||
# Otherwise, render an apologetic error message.
|
||||
if self.dirnode_children:
|
||||
if self.dirnode_children is not None:
|
||||
return ctx.tag
|
||||
else:
|
||||
return T.div[T.p["Error reading directory:"],
|
||||
|
Loading…
Reference in New Issue
Block a user