Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2013-11-18 20:39:52 +0400
committerVincent Petry <pvince81@owncloud.com>2013-11-18 21:17:25 +0400
commit3e2fd9942b4c0c3d8109a28d01dafdf830553609 (patch)
tree08310fb0345ca1a078441f9b7d23b405221eb591 /lib
parent44c2f9aad2b475303b3bebb39f38954cb3210751 (diff)
Root size for home storage is now size of "files" subdir
Fixes #4593
Diffstat (limited to 'lib')
-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;
+ }
}