diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2015-03-30 16:07:41 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-04-07 13:30:28 +0200 |
commit | 0c48b069ba6cabe16522b72ac276ab266a326e9e (patch) | |
tree | f1276927a8b88292d84ad9dc4357ab1f69df98d1 /lib | |
parent | 498625ea3a9c5ad44597d39a8c4e1b1cdfe57929 (diff) | |
download | nextcloud-server-0c48b069ba6cabe16522b72ac276ab266a326e9e.tar.gz nextcloud-server-0c48b069ba6cabe16522b72ac276ab266a326e9e.zip |
call end() before closing the file
Diffstat (limited to 'lib')
-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(); } |