fix disk_used_percentage to use db calculated used size

This commit is contained in:
Isaac Connor 2017-12-22 09:02:49 -08:00
parent 915ea93348
commit f51259443c
1 changed files with 2 additions and 5 deletions

View File

@ -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() {