don´t show negative numbers. this is only a quickfix. I still dont get why the Shared folder can be bigger than the root folder. Perhaps a inconsitency in the filecache?

This commit is contained in:
Frank Karlitschek 2012-10-04 12:58:57 +02:00
parent 16eade5a3b
commit 7efbdb52f6
1 changed files with 1 additions and 0 deletions

View File

@ -24,6 +24,7 @@ if (!isset($sharedInfo['size'])) {
$sharedSize = $sharedInfo['size'];
}
$used=$rootInfo['size']-$sharedSize;
if($used<0) $used=0;
$free=OC_Filesystem::free_space();
$total=$free+$used;
if($total==0) $total=1; // prevent division by zero