|
|
@ -432,12 +432,13 @@ class DirListingHandler(FileBaseHandler):
|
|
|
|
self.wfile.write(listing)
|
|
|
|
self.wfile.write(listing)
|
|
|
|
|
|
|
|
|
|
|
|
def convertSize(self, size):
|
|
|
|
def convertSize(self, size):
|
|
|
|
ext = None
|
|
|
|
for ext in "KMGT":
|
|
|
|
for ext in "BKMGT":
|
|
|
|
size /= 1024.0
|
|
|
|
if size < 1024.0:
|
|
|
|
if size < 1024.0:
|
|
|
|
break
|
|
|
|
break
|
|
|
|
size /= 1024.0
|
|
|
|
if ext == "K" and size < 0.1:
|
|
|
|
return (size, ext)
|
|
|
|
size = 0.1
|
|
|
|
|
|
|
|
return (size, ext.strip())
|
|
|
|
|
|
|
|
|
|
|
|
def getCleanPath(self):
|
|
|
|
def getCleanPath(self):
|
|
|
|
urlPath = posixpath.normpath(urllib.unquote(self.path)).strip("/")
|
|
|
|
urlPath = posixpath.normpath(urllib.unquote(self.path)).strip("/")
|
|
|
|