diff options
author | Vincent Petry <pvince81@owncloud.com> | 2015-07-27 16:58:32 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2015-07-27 16:58:32 +0200 |
commit | 6ada1e327661b7ee2a4cf2d49aa6843352d1c31d (patch) | |
tree | 1011ecae7a8e3f90f97eb766c29210facfdcc674 | |
parent | 68f14a943acb7b2f51a4f717cd043f2ac2d4def8 (diff) | |
parent | 0736b45d9238d553a53698c75139bd666861ae59 (diff) | |
download | nextcloud-server-6ada1e327661b7ee2a4cf2d49aa6843352d1c31d.tar.gz nextcloud-server-6ada1e327661b7ee2a4cf2d49aa6843352d1c31d.zip |
Merge pull request #17902 from owncloud/fix_17898
get header size before we open the file to avoid locking exception
-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 af3d14082c4..51aa13065c1 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; } |