summaryrefslogtreecommitdiffstats
path: root/module/web/pyload/views.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-02-10 21:59:31 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-02-10 21:59:31 +0100
commit6c4eabfc4b686a72224ff06cb56c385bfc489790 (patch)
tree913239e4a2d994e813134b94f66a49eec9a4b201 /module/web/pyload/views.py
parentwebif patch #75 (thx kepheus) (diff)
downloadpyload-6c4eabfc4b686a72224ff06cb56c385bfc489790.tar.xz
Webinterface with lighttpd! locale fixing try.
Diffstat (limited to 'module/web/pyload/views.py')
-rw-r--r--module/web/pyload/views.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/module/web/pyload/views.py b/module/web/pyload/views.py
index 2891b373d..e8df50596 100644
--- a/module/web/pyload/views.py
+++ b/module/web/pyload/views.py
@@ -7,6 +7,7 @@ from os import stat
from os.path import isdir
from os.path import isfile
from os.path import join
+from urllib import unquote
from django.conf import settings
from django.contrib.auth.decorators import login_required
@@ -16,7 +17,6 @@ from django.shortcuts import render_to_response
from django.template import RequestContext
from django.utils.translation import ugettext as _
-
def check_server(function):
def _dec(view_func):
def _view(request, * args, ** kwargs):
@@ -110,14 +110,14 @@ def downloads(request):
@permission('pyload.can_download')
@check_server
def download(request, path):
+ path = unquote(path)
path = path.split("/")
-
+
dir = join(settings.DL_ROOT, path[1].replace('..', ''))
if isdir(dir) or isfile(dir):
if isdir(dir): filepath = join(dir, path[2])
elif isfile(dir): filepath = dir
- print filepath
if isfile(filepath):
try:
type, encoding = mimetypes.guess_type(filepath)