call end() before closing the file
This commit is contained in:
parent
498625ea3a
commit
0c48b069ba
1 changed files with 7 additions and 1 deletions
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue