Remove mimetype check when calculating size
We currently try to skip size formatting for folders. However we compare with a bogix mimetype so the check is false in every case. Further folders typically have a size of 512 bytes or 4k. In both cases we don't really need to skip the size formatting so instead of fixing the check just skip it and do the size formatting unconditionally. Change-Id: I7ef021381bb56acf4b22551cc5d5613470fd6d08
This commit is contained in:
parent
125eeed6fe
commit
d6cc971de5
@ -362,10 +362,7 @@ class Indexer():
|
||||
filename)
|
||||
output += '<td>%s</td>' % time.asctime(
|
||||
file_details.last_modified)
|
||||
if file_details.mimetype == 'folder':
|
||||
size = str(file_details.size)
|
||||
else:
|
||||
size = sizeof_fmt(file_details.size, suffix='')
|
||||
size = sizeof_fmt(file_details.size, suffix='')
|
||||
output += '<td style="text-align: right">%s</td>' % size
|
||||
output += '</tr>\n'
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user