call end() before closing the file

This commit is contained in:
Bjoern Schiessle 2015-03-30 16:07:41 +02:00 committed by Thomas Müller
parent 498625ea3a
commit 0c48b069ba
1 changed files with 7 additions and 1 deletions

View File

@ -363,7 +363,13 @@ class Encryption extends Wrapper {
public function stream_close() {
$this->flush();
$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();
}