From 814cab97cff7c45142cf5a351e6471e1a72ffbb5 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Mon, 18 Jun 2012 17:23:54 +0200 Subject: [PATCH] ignore "Shared"-directory when calculating free space Conflicts: lib/fileproxy/quota.php --- lib/fileproxy/quota.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/fileproxy/quota.php b/lib/fileproxy/quota.php index 9e4c2d0643..dab41c5e90 100644 --- a/lib/fileproxy/quota.php +++ b/lib/fileproxy/quota.php @@ -54,8 +54,10 @@ class OC_FileProxy_Quota extends OC_FileProxy{ * @return int */ private function getFreeSpace(){ - $rootInfo=OC_FileCache::get(''); - $usedSpace=$rootInfo['size']; + $rootInfo=OC_FileCache_Cached::get(''); + $sharedInfo=OC_FileCache_Cached::get('/Shared'); + $usedSpace=isset($rootInfo['size'])?$rootInfo['size']:0; + $usedSpace=isset($sharedInfo['size'])?$rootInfo['size']-$sharedInfo['size']:$rootInfo['size']; $totalSpace=$this->getQuota(); if($totalSpace==0){ return 0;