diff options
Diffstat (limited to 'lib/private/files/stream/encryption.php')
-rw-r--r-- | lib/private/files/stream/encryption.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/private/files/stream/encryption.php b/lib/private/files/stream/encryption.php index bd90f00825e..40cbc1c141a 100644 --- a/lib/private/files/stream/encryption.php +++ b/lib/private/files/stream/encryption.php @@ -363,7 +363,13 @@ class Encryption extends Wrapper { public function stream_close() { $this->flush(); - $this->encryptionStorage->updateUnencryptedSize($this->fullPath, $this->unencryptedSize); + $remainingData = $this->encryptionModule->end($this->fullPath); + if ($this->readOnly === false) { + if(!empty($remainingData)) { + parent::stream_write($remainingData); + } + $this->encryptionStorage->updateUnencryptedSize($this->fullPath, $this->unencryptedSize); + } return parent::stream_close(); } |