Replaced posixpath calls with os.path

This commit is contained in:
Sebastian Lohff 2015-11-10 20:39:42 +01:00
parent 0c781c2b73
commit 11ad07cc76
1 changed files with 2 additions and 3 deletions

View File

@ -16,7 +16,6 @@ import datetime
import mimetypes import mimetypes
import urllib import urllib
import os import os
import posixpath
import re import re
import select import select
import socket import socket
@ -402,7 +401,7 @@ class DirListingHandler(FileBaseHandler):
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
""" % {'path': posixpath.normpath(urllib.unquote(self.path))} """ % {'path': os.path.normpath(urllib.unquote(self.path))}
footer = """</tbody></table></div> footer = """</tbody></table></div>
<div class="footer"><a href="http://seba-geek.de/stuff/servefile/">servefile %(version)s</a></div> <div class="footer"><a href="http://seba-geek.de/stuff/servefile/">servefile %(version)s</a></div>
</body> </body>
@ -464,7 +463,7 @@ class DirListingHandler(FileBaseHandler):
return (size, ext.strip()) return (size, ext.strip())
def getCleanPath(self): def getCleanPath(self):
urlPath = posixpath.normpath(urllib.unquote(self.path)).strip("/") urlPath = os.path.normpath(urllib.unquote(self.path)).strip("/")
path = os.path.join(self.targetDir, urlPath) path = os.path.join(self.targetDir, urlPath)
return path return path