diff --git a/librarian/plugins/diskspace/views/diskspace/_space_info.tpl b/librarian/plugins/diskspace/views/diskspace/_space_info.tpl index 0302e982..a648ce8c 100644 --- a/librarian/plugins/diskspace/views/diskspace/_space_info.tpl +++ b/librarian/plugins/diskspace/views/diskspace/_space_info.tpl @@ -1,7 +1,7 @@ <%namespace name="widgets" file="../_widgets.tpl"/> <%def name="space(free, total)"> -<% pct = round(free / total * 100, 1) if total != 0 else 100 %> +<% pct = round((total - free) / float(total) * 100, 1) if total else 100 %> ## Translators, %s is the amount of free space in bytes, KB, MB, etc. ${widgets.progress(_('Total space (%s free)') % h.hsize(free), pct)}