diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-03-30 17:13:42 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-04-07 13:30:28 +0200 |
commit | d185761d31f4845e9bf39dbbe0c61d199689deb7 (patch) | |
tree | ae8e536abca87e2413d48e34975234bd3c2e2dff /lib/private | |
parent | 4441835d189d037a021ba9a11fd96cf55ba2db3f (diff) | |
download | nextcloud-server-d185761d31f4845e9bf39dbbe0c61d199689deb7.tar.gz nextcloud-server-d185761d31f4845e9bf39dbbe0c61d199689deb7.zip |
initializing some variables + update size after writing the headers
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/files/stream/encryption.php | 6 |
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); } } |