summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar zoidberg10 <zoidberg@mujmail.cz> 2011-12-06 00:25:59 +0100
committerGravatar zoidberg10 <zoidberg@mujmail.cz> 2011-12-06 00:25:59 +0100
commit5c07fbc62078366381e8dbc93df060db24f165d4 (patch)
tree170b324189cf8fe8838764a61d46d470c8e3645c
parentlittle fs improvements (diff)
downloadpyload-5c07fbc62078366381e8dbc93df060db24f165d4.tar.xz
fix webinterface downloads list on synology
-rw-r--r--module/web/pyload_app.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/module/web/pyload_app.py b/module/web/pyload_app.py
index 067eea9d3..e6c9ab436 100644
--- a/module/web/pyload_app.py
+++ b/module/web/pyload_app.py
@@ -36,7 +36,7 @@ from utils import render_to_response, parse_permissions, parse_userdata, \
from filters import relpath, unquotepath
-from module.utils import formatSize, save_join
+from module.utils import formatSize, save_join, fs_encode, fs_decode
# Helper
@@ -196,9 +196,9 @@ def downloads():
'files': []
}
- items = listdir(root)
+ items = listdir(fs_encode(root))
- for item in sorted(items):
+ for item in sorted([fs_decode(x) for x in items]):
if isdir(save_join(root, item)):
folder = {
'name': item,
@@ -206,7 +206,7 @@ def downloads():
'files': []
}
files = listdir(save_join(root, item))
- for file in sorted(files):
+ for file in sorted([fs_decode(x) for x in files]):
try:
if isfile(save_join(root, item, file)):
folder['files'].append(file)
@@ -230,7 +230,7 @@ def get_download(path):
path = path.replace("..", "")
try:
- return static_file(path, root)
+ return static_file(fs_encode(path), fs_encode(root))
except Exception, e:
print e