diff options
Diffstat (limited to 'lib/fileproxy/quota.php')
-rw-r--r-- | lib/fileproxy/quota.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/fileproxy/quota.php b/lib/fileproxy/quota.php index 9e4c2d0643e..7316224cc61 100644 --- a/lib/fileproxy/quota.php +++ b/lib/fileproxy/quota.php @@ -54,8 +54,15 @@ class OC_FileProxy_Quota extends OC_FileProxy{ * @return int */ private function getFreeSpace(){ - $rootInfo=OC_FileCache::get(''); - $usedSpace=$rootInfo['size']; + $rootInfo=OC_FileCache_Cached::get(''); + // TODO Remove after merge of share_api + if (OC_FileCache::inCache('/Shared')) { + $sharedInfo=OC_FileCache_Cached::get('/Shared'); + } else { + $sharedInfo = null; + } + $usedSpace=isset($rootInfo['size'])?$rootInfo['size']:0; + $usedSpace=isset($sharedInfo['size'])?$usedSpace-$sharedInfo['size']:$usedSpace; $totalSpace=$this->getQuota(); if($totalSpace==0){ return 0; |