[Pkg-owncloud-commits] [owncloud] 105/131: get header size before we open the file to avoid locking exception

David Prévot taffit at moszumanska.debian.org
Tue Aug 11 15:58:41 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag v8.1.1
in repository owncloud.

commit 4b41021fc34e223738aefad77fd896373360ff59
Author: Bjoern Schiessle <schiessle at owncloud.com>
Date:   Mon Jul 27 14:29:07 2015 +0200

    get header size before we open the file to avoid locking exception
---
 lib/private/files/storage/wrapper/encryption.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/private/files/storage/wrapper/encryption.php b/lib/private/files/storage/wrapper/encryption.php
index 6129079..155a4fd 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;
 			}
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list