summaryrefslogtreecommitdiffstats
path: root/module/web
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-11-26 23:58:05 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-11-26 23:58:05 +0100
commitb9180617c9a1a8d8fcaa4345eaa3d16f81d14672 (patch)
tree9a11a079189e5797531eebd697ef7946972feefb /module/web
parentfileserve, prefetch fix (diff)
downloadpyload-b9180617c9a1a8d8fcaa4345eaa3d16f81d14672.tar.xz
path browser encoding fix
Diffstat (limited to 'module/web')
-rw-r--r--module/web/pyload/views.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/module/web/pyload/views.py b/module/web/pyload/views.py
index cca337303..40d3b8207 100644
--- a/module/web/pyload/views.py
+++ b/module/web/pyload/views.py
@@ -8,6 +8,7 @@ from os import stat
from os.path import isdir
from os.path import isfile
from os.path import join
+from sys import getfilesystemencoding
from urllib import unquote
from itertools import chain
from datetime import datetime
@@ -407,6 +408,11 @@ def path(request, path, type):
cwd = os.path.relpath(path)
else:
cwd = os.getcwd()
+
+ try:
+ cwd = cwd.encode("utf8")
+ except:
+ pass
cwd = os.path.normpath(os.path.abspath(cwd))
parentdir = os.path.dirname(cwd)
@@ -429,6 +435,7 @@ def path(request, path, type):
for f in folders:
try:
+ f = f.decode(getfilesystemencoding())
data = {}
data['name'] = f
data['fullpath'] = os.path.join(cwd, f)