1
0
mirror of https://github.com/django/django.git synced 2024-12-24 18:16:19 +00:00

Fixed #896 -- Fixed error in filesystem serve view in Windows. Thanks, Petar Marić and nesh

git-svn-id: http://code.djangoproject.com/svn/django/trunk@1402 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2005-11-24 22:41:05 +00:00
parent 827ebe5368
commit 18c7ed74e4

View File

@ -34,7 +34,7 @@ def serve(request, path, document_root=None, show_indexes=False):
if part in (os.curdir, os.pardir):
# strip '.' amd '..' in path
continue
newpath = os.path.join(newpath, part)
newpath = os.path.join(newpath, part).replace('\\', '/')
if newpath and path != newpath:
return HttpResponseRedirect(newpath)
fullpath = os.path.join(document_root, newpath)