diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-11-10 22:04:19 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-11-10 22:04:19 +0100 |
commit | dc31ed82fc946e00e46f7e4b964a336825cae52b (patch) | |
tree | c0797c94d1f81273f5965ef111ea600729d6b571 /module/web | |
parent | add icons (diff) | |
download | pyload-dc31ed82fc946e00e46f7e4b964a336825cae52b.tar.xz |
skip invalid paths
Diffstat (limited to 'module/web')
-rw-r--r-- | module/web/pyload/views.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/module/web/pyload/views.py b/module/web/pyload/views.py index 26ff28b16..c1cd31f5f 100644 --- a/module/web/pyload/views.py +++ b/module/web/pyload/views.py @@ -412,12 +412,15 @@ def path(request, path, type): files = [] for f in folders: - data = {} - data['name'] = f - data['fullpath'] = os.path.join(cwd, f) - data['sort'] = data['fullpath'].lower() - data['modified'] = datetime.fromtimestamp(int(os.path.getmtime(os.path.join(cwd, f)))) - data['ext'] = os.path.splitext(f)[1] + try: + data = {} + data['name'] = f + data['fullpath'] = os.path.join(cwd, f) + data['sort'] = data['fullpath'].lower() + data['modified'] = datetime.fromtimestamp(int(os.path.getmtime(os.path.join(cwd, f)))) + data['ext'] = os.path.splitext(f)[1] + except: + continue if os.path.isdir(os.path.join(cwd, f)): data['type'] = 'dir' |