summaryrefslogtreecommitdiffstats
path: root/module/web
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-12-05 21:01:34 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-12-05 21:01:34 +0100
commitc135b3575179015f01cb9e51034bac057fa8f014 (patch)
tree6ae5505190948d8c249c10489f23273894d1f746 /module/web
parentsimplehoster - use parseFileSize (diff)
downloadpyload-c135b3575179015f01cb9e51034bac057fa8f014.tar.xz
little fs improvements
Diffstat (limited to 'module/web')
-rw-r--r--module/web/pyload_app.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/module/web/pyload_app.py b/module/web/pyload_app.py
index c64619c57..067eea9d3 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, fs_decode
+from module.utils import formatSize, save_join
# Helper
@@ -187,7 +187,7 @@ def collector():
@route("/downloads")
@login_required('DOWNLOAD')
def downloads():
- root = fs_decode(PYLOAD.getConfigValue("general", "download_folder"))
+ root = PYLOAD.getConfigValue("general", "download_folder")
if not isdir(root):
return base([_('Download directory not found.')])
@@ -196,19 +196,19 @@ def downloads():
'files': []
}
- items = [fs_decode(x) for x in listdir(root)]
+ items = listdir(root)
for item in sorted(items):
- if isdir(join(root, item)):
+ if isdir(save_join(root, item)):
folder = {
'name': item,
'path': item,
'files': []
}
- files = [fs_decode(x) for x in listdir(join(root, item))]
+ files = listdir(save_join(root, item))
for file in sorted(files):
try:
- if isfile(join(root, item, file)):
+ if isfile(save_join(root, item, file)):
folder['files'].append(file)
except:
pass
@@ -223,7 +223,7 @@ def downloads():
@route("/downloads/get/:path#.+#")
@login_required("DOWNLOAD")
def get_download(path):
- path = unquote(path)
+ path = unquote(path).decode("utf8")
#@TODO some files can not be downloaded
root = PYLOAD.getConfigValue("general", "download_folder")