summaryrefslogtreecommitdiffstats
path: root/lib/private/files/storage
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2015-07-27 14:29:07 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2015-07-27 14:29:07 +0200
commit0736b45d9238d553a53698c75139bd666861ae59 (patch)
tree8e2f89d6651331cb3300fd56b605f07480b96fed /lib/private/files/storage
parentc030ae9decd1558a7ececf1dcbc556c293d00ea2 (diff)
downloadnextcloud-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.php3
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;
}