diff --git a/airtime_mvc/application/models/Systemstatus.php b/airtime_mvc/application/models/Systemstatus.php index 8c7e242e6..efebfcbb7 100644 --- a/airtime_mvc/application/models/Systemstatus.php +++ b/airtime_mvc/application/models/Systemstatus.php @@ -217,10 +217,14 @@ class Application_Model_Systemstatus //connect to DB and find how much total space user has allocated. $totalSpace = Application_Model_Preference::GetDiskQuota(); - $storPath = Application_Model_MusicDir::getStorDir()->getDirectory(); - - list($usedSpace,) = preg_split("/[\s]+/", exec("du -bs $storPath")); + $path = $_SERVER['AIRTIME_BASE']."etc/airtime/num_bytes.ini"; + $arr = parse_ini_file($path); + $usedSpace = 0; + if ($arr !== false) { + $usedSpace = $arr['num_bytes']; + } + $partitions[$totalSpace]->totalSpace = $totalSpace; $partitions[$totalSpace]->totalFreeSpace = $totalSpace - $usedSpace; Logging::info($partitions[$totalSpace]->totalFreeSpace);