summaryrefslogtreecommitdiffstats
path: root/module/web
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-01-09 13:41:35 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-01-09 13:41:35 +0100
commit0b6f6fd4ec80f8805cfa9135980903f3038f4c49 (patch)
tree7989f1d540d630e629844329817330d5f10d6068 /module/web
parentencoding fix (diff)
downloadpyload-0b6f6fd4ec80f8805cfa9135980903f3038f4c49.tar.xz
closed #213, #212, #101
Diffstat (limited to 'module/web')
-rw-r--r--module/web/pyload/views.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/module/web/pyload/views.py b/module/web/pyload/views.py
index 29ad90867..76f991921 100644
--- a/module/web/pyload/views.py
+++ b/module/web/pyload/views.py
@@ -145,16 +145,19 @@ def downloads(request):
'files': []
}
- for item in listdir(root):
+ for item in sorted(listdir(root)):
if isdir(join(root, item)):
folder = {
'name': item,
'path': item,
'files': []
}
- for file in listdir(join(root, item)):
- if isfile(join(root, item, file)):
- folder['files'].append(file)
+ for file in sorted(listdir(join(root, item))):
+ try:
+ if isfile(join(root, item, file)):
+ folder['files'].append(file)
+ except:
+ pass
data['folder'].append(folder)
elif isfile(join(root, item)):