summaryrefslogtreecommitdiffstats
path: root/lib/fileproxy
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2011-12-14 01:16:14 +0100
committerRobin Appelman <icewind1991@gmail.com>2011-12-14 01:16:14 +0100
commit835d6a9b6e1be4eab22d138e0ef01e608a5597bf (patch)
tree9c8e20f506fef3c4de89b5f6dc9372aaece9d613 /lib/fileproxy
parenta9e94a34c9a80929d606c4d64711ad8ecaff35e0 (diff)
downloadnextcloud-server-835d6a9b6e1be4eab22d138e0ef01e608a5597bf.tar.gz
nextcloud-server-835d6a9b6e1be4eab22d138e0ef01e608a5597bf.zip
save quota in human readable format (42 MB), should prevent some of the overflow related problems
Diffstat (limited to 'lib/fileproxy')
-rw-r--r--lib/fileproxy/quota.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/fileproxy/quota.php b/lib/fileproxy/quota.php
index f770c9cb32b..94a49176ee6 100644
--- a/lib/fileproxy/quota.php
+++ b/lib/fileproxy/quota.php
@@ -27,8 +27,10 @@
class OC_FileProxy_Quota extends OC_FileProxy{
private function getFreeSpace(){
- $usedSpace=OC_Filesystem::filesize('');
+ $rootInfo=OC_FileCache::get('');
+ $usedSpace=$rootInfo['size'];
$totalSpace=OC_Preferences::getValue(OC_User::getUser(),'files','quota',0);
+ $totalSpace=OC_Helper::computerFileSize($totalSpace);
if($totalSpace==0){
return 0;
}