aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Cache/CacheEntry.php
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2022-04-13 16:05:45 +0200
committerRobin Appelman <robin@icewind.nl>2022-08-16 13:54:26 +0200
commit1374cbee3e5d44ecec0a0784b3ab3a5afcc0d2ac (patch)
treec628e036930e72c11714c60b825cc38a4489e550 /lib/private/Files/Cache/CacheEntry.php
parent5e375d9092efd1e40a0ed37dfd2c208598b27bb9 (diff)
downloadnextcloud-server-1374cbee3e5d44ecec0a0784b3ab3a5afcc0d2ac.tar.gz
nextcloud-server-1374cbee3e5d44ecec0a0784b3ab3a5afcc0d2ac.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.php8
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'];
+ }
+ }
}