diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2015-07-27 14:29:07 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2015-07-27 14:29:07 +0200 |
commit | 0736b45d9238d553a53698c75139bd666861ae59 (patch) | |
tree | 8e2f89d6651331cb3300fd56b605f07480b96fed /lib/private/files/storage | |
parent | c030ae9decd1558a7ececf1dcbc556c293d00ea2 (diff) | |
download | nextcloud-server-0736b45d9238d553a53698c75139bd666861ae59.tar.gz nextcloud-server-0736b45d9238d553a53698c75139bd666861ae59.zip |
get header size before we open the file to avoid locking exception
Diffstat (limited to 'lib/private/files/storage')
-rw-r--r-- | lib/private/files/storage/wrapper/encryption.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/files/storage/wrapper/encryption.php b/lib/private/files/storage/wrapper/encryption.php index 61290791faa..155a4fde4ef 100644 --- a/lib/private/files/storage/wrapper/encryption.php +++ b/lib/private/files/storage/wrapper/encryption.php @@ -419,10 +419,11 @@ class Encryption extends Wrapper { } if ($shouldEncrypt === true && $encryptionModule !== null) { + $headerSize = $this->getHeaderSize($path); $source = $this->storage->fopen($path, $mode); $handle = \OC\Files\Stream\Encryption::wrap($source, $path, $fullPath, $header, $this->uid, $encryptionModule, $this->storage, $this, $this->util, $this->fileHelper, $mode, - $size, $unencryptedSize, $this->getHeaderSize($path)); + $size, $unencryptedSize, $headerSize); return $handle; } |