diff --git a/lib/private/files/storage/wrapper/encryption.php b/lib/private/files/storage/wrapper/encryption.php index 69438ef0c7cc..f358bd592390 100644 --- a/lib/private/files/storage/wrapper/encryption.php +++ b/lib/private/files/storage/wrapper/encryption.php @@ -129,9 +129,15 @@ public function filesize($path) { if (isset($this->unencryptedSize[$fullPath])) { $size = $this->unencryptedSize[$fullPath]; // update file cache + if ($info) { + $info = $info->getData(); + } else { + $info = []; + } + $info['encrypted'] = true; $info['size'] = $size; - $this->getCache()->put($path, $info->getData()); + $this->getCache()->put($path, $info); return $size; }