diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-02-09 11:06:22 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-02-09 11:06:22 +0100 |
commit | 254e0fa71a31d0ee77136ba0fee95fe7b136a4a0 (patch) | |
tree | 228ee5d33b25a97d9e0a56190fdeda1491ba95b0 | |
parent | 7e0ddfe0d0dc2f947d1ed45d8fdc44f7badba6bb (diff) | |
parent | 19980be116a16a354919960ef2623d0c247c9c2b (diff) | |
download | nextcloud-server-254e0fa71a31d0ee77136ba0fee95fe7b136a4a0.tar.gz nextcloud-server-254e0fa71a31d0ee77136ba0fee95fe7b136a4a0.zip |
Merge pull request #22220 from owncloud/enc-fixfilesizelogicwithpartfile
Fix part file partial cache logic in encryption code
-rw-r--r-- | lib/private/files/storage/wrapper/encryption.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/private/files/storage/wrapper/encryption.php b/lib/private/files/storage/wrapper/encryption.php index 69438ef0c7c..f358bd59239 100644 --- a/lib/private/files/storage/wrapper/encryption.php +++ b/lib/private/files/storage/wrapper/encryption.php @@ -129,9 +129,15 @@ class Encryption extends Wrapper { 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; } |