From 6524f6ad308101a36dc2e8b6dfe275d892a3c7be Mon Sep 17 00:00:00 2001 From: Michael Gapczynski Date: Wed, 20 Jun 2012 19:24:07 -0400 Subject: [PATCH] Only call OC_FileCache::get('/Shared') if it exists in the file cache, prevents premature addition of the Shared folder to the file cache --- lib/fileproxy/quota.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/fileproxy/quota.php b/lib/fileproxy/quota.php index 82eca1ce44..1d2a1ffcf0 100644 --- a/lib/fileproxy/quota.php +++ b/lib/fileproxy/quota.php @@ -55,7 +55,12 @@ class OC_FileProxy_Quota extends OC_FileProxy{ */ private function getFreeSpace(){ $rootInfo=OC_FileCache::get(''); - $sharedInfo=OC_FileCache::get('/Shared'); + // TODO Remove after merge of share_api + if (OC_FileCache::inCache('/Shared')) { + $sharedInfo=OC_FileCache::get('/Shared'); + } else { + $sharedInfo = null; + } $usedSpace=isset($rootInfo['size'])?$rootInfo['size']:0; $usedSpace=isset($sharedInfo['size'])?$usedSpace-$sharedInfo['size']:$usedSpace; $totalSpace=$this->getQuota();