diff --git a/lib/fileproxy/quota.php b/lib/fileproxy/quota.php
index 82eca1ce4405a778ba3062253d70d93a430b1d47..1d2a1ffcf0bc29a59bdd06caa2e65f0329206421 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();