Commit 30f70ac4 authored by Marco Mariani's avatar Marco Mariani

fix listDirs() in subfolders

parent c4b85c7d
...@@ -28,8 +28,13 @@ class fileBrowser(object): ...@@ -28,8 +28,13 @@ class fileBrowser(object):
def listDirs(self, dir, all=False): def listDirs(self, dir, all=False):
"""List elements of directory 'dir' taken""" """List elements of directory 'dir' taken"""
html = 'var gsdirs = [], gsfiles=[];' html = 'var gsdirs = [], gsfiles = [];'
realdir = self._realdir(dir)
dir = urllib.unquote(dir)
# 'dir' is used below. XXX should not shadow a builtin name
realdir = realpath(self.config, dir)
if not realdir:
raise NameError('Could not load directory %s: Permission denied' % dir)
ldir = sorted(os.listdir(realdir), key=str.lower) ldir = sorted(os.listdir(realdir), key=str.lower)
for f in ldir: for f in ldir:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment