From f51259443c46c0a2753014764399c9566cb49504 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 22 Dec 2017 09:02:49 -0800 Subject: [PATCH] fix disk_used_percentage to use db calculated used size --- web/includes/Storage.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/web/includes/Storage.php b/web/includes/Storage.php index e14d00e92..5bbdcbbdf 100644 --- a/web/includes/Storage.php +++ b/web/includes/Storage.php @@ -95,11 +95,8 @@ class Storage { Error("disk_total_space returned false for " . $path ); return 0; } - $free = disk_free_space( $path ); - if ( ! $free ) { - Error("disk_free_space returned false for " . $path ); - } - $usage = round(($total - $free) / $total * 100); + $used = $this->disk_used_space(); + $usage = round( ($used / $total) * 100); return $usage; } public function disk_total_space() {