]> source.dussan.org Git - nextcloud-server.git/commitdiff
ignore "Shared"-directory when calculating free space
authorBjoern Schiessle <schiessle@owncloud.com>
Mon, 18 Jun 2012 15:23:54 +0000 (17:23 +0200)
committerBjoern Schiessle <schiessle@owncloud.com>
Mon, 18 Jun 2012 15:27:42 +0000 (17:27 +0200)
Conflicts:

lib/fileproxy/quota.php

lib/fileproxy/quota.php

index 9e4c2d0643e46201985d9341cddc2ec51e1683f9..dab41c5e9066969f482f34e129505fb9594e0a1b 100644 (file)
@@ -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;