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

View file

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