diff options
Diffstat (limited to 'lib/helper.php')
-rw-r--r-- | lib/helper.php | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/helper.php b/lib/helper.php index afeb3771048..5fb8fed3459 100644 --- a/lib/helper.php +++ b/lib/helper.php @@ -904,10 +904,8 @@ class OC_Helper { } else { $total = $free; //either unknown or unlimited } - if ($total == 0) { - $total = 1; // prevent division by zero - } - if ($total >= 0) { + if ($total > 0) { + // prevent division by zero or error codes (negative values) $relative = round(($used / $total) * 10000) / 100; } else { $relative = 0; |