Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Gapczynski <GapczynskiM@gmail.com>2012-06-21 03:24:07 +0400
committerMichael Gapczynski <GapczynskiM@gmail.com>2012-06-21 03:24:45 +0400
commit6524f6ad308101a36dc2e8b6dfe275d892a3c7be (patch)
tree6dafda6afe6680db9c36d133da65e0de7b1ebada
parente43d02fadb25c7cfce8e57f542e27b458c147a30 (diff)
Only call OC_FileCache::get('/Shared') if it exists in the file cache, prevents premature addition of the Shared folder to the file cache
-rw-r--r--lib/fileproxy/quota.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/fileproxy/quota.php b/lib/fileproxy/quota.php
index 82eca1ce440..1d2a1ffcf0b 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();