summaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Cache/CacheEntry.php
diff options
context:
space:
mode:
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'];
+ }
+ }
}