diff options
author | Robin Appelman <robin@icewind.nl> | 2022-04-13 16:05:45 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2022-06-02 16:07:00 +0200 |
commit | 8238582e59b7b6ec03318bcf81bf47cce54af320 (patch) | |
tree | ec45259377aeed1088baa9f5ad8c7891eb489af7 /lib/private/Files/Cache/CacheEntry.php | |
parent | 2a68819a67045d87a369a8a6413f153b3b2bea5f (diff) | |
download | nextcloud-server-8238582e59b7b6ec03318bcf81bf47cce54af320.tar.gz nextcloud-server-8238582e59b7b6ec03318bcf81bf47cce54af320.zip |
store unencrypted size in the unencrypted_size column
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private/Files/Cache/CacheEntry.php')
-rw-r--r-- | lib/private/Files/Cache/CacheEntry.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/private/Files/Cache/CacheEntry.php b/lib/private/Files/Cache/CacheEntry.php index 12f0273fb6e..8ac76acf6d1 100644 --- a/lib/private/Files/Cache/CacheEntry.php +++ b/lib/private/Files/Cache/CacheEntry.php @@ -132,4 +132,12 @@ class CacheEntry implements ICacheEntry { public function __clone() { $this->data = array_merge([], $this->data); } + + public function getUnencryptedSize(): int { + if (isset($this->data['unencrypted_size']) && $this->data['unencrypted_size'] > 0) { + return $this->data['unencrypted_size']; + } else { + return $this->data['size']; + } + } } |