summaryrefslogtreecommitdiffstats
path: root/lib/private/files/stream/encryption.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/files/stream/encryption.php')
-rw-r--r--lib/private/files/stream/encryption.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/files/stream/encryption.php b/lib/private/files/stream/encryption.php
index 3e8c3a912da..df74eeff893 100644
--- a/lib/private/files/stream/encryption.php
+++ b/lib/private/files/stream/encryption.php
@@ -271,8 +271,7 @@ class Encryption extends Wrapper {
public function stream_write($data) {
if ($this->position === 0) {
- $this->writeHeader();
- $this->size+=$this->util->getBlockSize();
+ $this->size+=$this->writeHeader();
}
$length = 0;
@@ -411,11 +410,12 @@ class Encryption extends Wrapper {
/**
* write header at beginning of encrypted file
*
+ * @return integer
* @throws EncryptionHeaderKeyExistsException if header key is already in use
*/
private function writeHeader() {
$header = $this->util->createHeader($this->newHeader, $this->encryptionModule);
- parent::stream_write($header);
+ return parent::stream_write($header);
}
}