Replaced posixpath calls with os.path
This commit is contained in:
parent
0c781c2b73
commit
11ad07cc76
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue