mirror of
https://github.com/borgbase/vorta
synced 2024-12-21 23:33:13 +00:00
Fixes math error for negative size in diff view in archive tab
Signed-off-by: Chirag Aggarwal <thechiragaggarwal@gmail.com>
This commit is contained in:
parent
6bc532187b
commit
c4d16e250d
1 changed files with 1 additions and 1 deletions
|
@ -266,7 +266,7 @@ def find_best_unit_for_size(size: Optional[int], metric: bool = True, precision:
|
|||
if not isinstance(size, int) or size == 0: # this will also take care of the None case
|
||||
return 0
|
||||
power = 10**3 if metric else 2**10
|
||||
n = math.floor(math.log(size * 10**precision, power))
|
||||
n = math.floor(math.log(abs(size) * 10**precision, power))
|
||||
return n
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue