Merge pull request #17902 from owncloud/fix_17898

get header size before we open the file to avoid locking exception
This commit is contained in:
Vincent Petry 2015-07-27 16:58:32 +02:00
commit 6ada1e3276
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}