From 3e2fd9942b4c0c3d8109a28d01dafdf830553609 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Mon, 18 Nov 2013 17:39:52 +0100 Subject: Root size for home storage is now size of "files" subdir Fixes #4593 --- lib/private/files/cache/homecache.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'lib/private') 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; + } } -- cgit v1.2.3