diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-03-07 11:25:29 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-03-07 14:59:09 +0100 |
commit | 48d63a6278078d164774fd182f03ebba5e3c77ad (patch) | |
tree | 892f4baee51b2d74560555609bc927c052b57d50 /lib/private | |
parent | 7f24d42ca5f70e5ed48cf800f0a8f134b9445d2e (diff) | |
download | nextcloud-server-48d63a6278078d164774fd182f03ebba5e3c77ad.tar.gz nextcloud-server-48d63a6278078d164774fd182f03ebba5e3c77ad.zip |
Return unencrypted_size of folder when queried
This fixes the "used space" to be based on the unencrypted size, not
encrypted size, to be consistent with how quota/space is handled when
encryption is enabled
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/files/storage/wrapper/quota.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/private/files/storage/wrapper/quota.php b/lib/private/files/storage/wrapper/quota.php index 26c952e694a..ea612735477 100644 --- a/lib/private/files/storage/wrapper/quota.php +++ b/lib/private/files/storage/wrapper/quota.php @@ -36,6 +36,11 @@ class Quota extends Wrapper { $cache = $this->getCache(); $data = $cache->get($path); if (is_array($data) and isset($data['size'])) { + if (isset($data['unencrypted_size']) + && $data['unencrypted_size'] > 0 + ) { + return $data['unencrypted_size']; + } return $data['size']; } else { return \OC\Files\SPACE_NOT_COMPUTED; |