diff options
author | icewind1991 <robin@icewind.nl> | 2014-06-05 11:23:32 +0200 |
---|---|---|
committer | icewind1991 <robin@icewind.nl> | 2014-06-05 11:23:32 +0200 |
commit | bd373d9621a409cba626ac7b1a4bb9d03c3b0f3b (patch) | |
tree | af58b8b4159a148d297248fb68a25e4530515647 /lib/private/files | |
parent | e0c4e960d9d1289c28dfbffde2fb9c1d30987f56 (diff) | |
parent | da889ff029446119cf6159e75c48ef83be7de7e8 (diff) | |
download | nextcloud-server-bd373d9621a409cba626ac7b1a4bb9d03c3b0f3b.tar.gz nextcloud-server-bd373d9621a409cba626ac7b1a4bb9d03c3b0f3b.zip |
Merge pull request #7878 from owncloud/quota-extstorageswitch
Added switch to count external storage data in quota
Diffstat (limited to 'lib/private/files')
-rw-r--r-- | lib/private/files/view.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/private/files/view.php b/lib/private/files/view.php index 71c4980db2d..09b100d7cfd 100644 --- a/lib/private/files/view.php +++ b/lib/private/files/view.php @@ -807,7 +807,8 @@ class View { * get the filesystem info * * @param string $path - * @param boolean $includeMountPoints whether to add mountpoint sizes, + * @param boolean|string $includeMountPoints true to add mountpoint sizes, + * 'ext' to add only ext storage mount point sizes. Defaults to true. * defaults to true * @return \OC\Files\FileInfo|false */ @@ -845,10 +846,15 @@ class View { if ($data and isset($data['fileid'])) { if ($includeMountPoints and $data['mimetype'] === 'httpd/unix-directory') { //add the sizes of other mountpoints to the folder + $extOnly = ($includeMountPoints === 'ext'); $mountPoints = Filesystem::getMountPoints($path); foreach ($mountPoints as $mountPoint) { $subStorage = Filesystem::getStorage($mountPoint); if ($subStorage) { + // exclude shared storage ? + if ($extOnly && $subStorage instanceof \OC\Files\Storage\Shared) { + continue; + } $subCache = $subStorage->getCache(''); $rootEntry = $subCache->get(''); $data['size'] += isset($rootEntry['size']) ? $rootEntry['size'] : 0; |