Merge pull request #235 from TheNain38/patch-1
Fix error when opening menu if file size is null
This commit is contained in:
commit
2121612a72
1 changed files with 4 additions and 1 deletions
|
@ -144,6 +144,9 @@ class UiWebsocketPlugin(object):
|
|||
else:
|
||||
size = size_filetypes.get(extension, 0)
|
||||
size_other -= size
|
||||
if size_total == 0:
|
||||
percent = 0
|
||||
else:
|
||||
percent = 100 * (float(size) / size_total)
|
||||
body.append(u"<li style='width: %.2f%%' class='%s back-%s' title='%s'></li>" % (percent, extension, color, extension))
|
||||
|
||||
|
|
Loading…
Reference in a new issue