]> source.dussan.org Git - nextcloud-server.git/commitdiff
Only call OC_FileCache::get('/Shared') if it exists in the file cache, prevents prema...
authorMichael Gapczynski <GapczynskiM@gmail.com>
Wed, 20 Jun 2012 23:24:07 +0000 (19:24 -0400)
committerMichael Gapczynski <GapczynskiM@gmail.com>
Wed, 20 Jun 2012 23:24:45 +0000 (19:24 -0400)
lib/fileproxy/quota.php

index 82eca1ce4405a778ba3062253d70d93a430b1d47..1d2a1ffcf0bc29a59bdd06caa2e65f0329206421 100644 (file)
@@ -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();