diff options
author | Vincent Petry <pvince81@owncloud.com> | 2013-11-18 17:39:52 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2013-11-18 18:17:25 +0100 |
commit | 3e2fd9942b4c0c3d8109a28d01dafdf830553609 (patch) | |
tree | 08310fb0345ca1a078441f9b7d23b405221eb591 /lib/private | |
parent | 44c2f9aad2b475303b3bebb39f38954cb3210751 (diff) | |
download | nextcloud-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.php | 13 |
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; + } } |