aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2013-11-18 17:39:52 +0100
committerVincent Petry <pvince81@owncloud.com>2013-11-18 18:17:25 +0100
commit3e2fd9942b4c0c3d8109a28d01dafdf830553609 (patch)
tree08310fb0345ca1a078441f9b7d23b405221eb591 /lib/private
parent44c2f9aad2b475303b3bebb39f38954cb3210751 (diff)
downloadnextcloud-server-3e2fd9942b4c0c3d8109a28d01dafdf830553609.tar.gz
nextcloud-server-3e2fd9942b4c0c3d8109a28d01dafdf830553609.zip
Root size for home storage is now size of "files" subdir
Fixes #4593
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/files/cache/homecache.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/private/files/cache/homecache.php b/lib/private/files/cache/homecache.php
index 4b14bd12190..18dfbfe3191 100644
--- a/lib/private/files/cache/homecache.php
+++ b/lib/private/files/cache/homecache.php
@@ -37,4 +37,17 @@ class HomeCache extends Cache {
}
return $totalSize;
}
+
+ public function get($path) {
+ $data = parent::get($path);
+ if ($path === '' or $path === '/') {
+ // only the size of the "files" dir counts
+ $filesData = parent::get('files');
+
+ if (isset($filesData['size'])) {
+ $data['size'] = $filesData['size'];
+ }
+ }
+ return $data;
+ }
}