Skip to content
Snippets Groups Projects
Commit 6ada1e32 authored by Vincent Petry's avatar Vincent Petry
Browse files

Merge pull request #17902 from owncloud/fix_17898

get header size before we open the file to avoid locking exception
parents 68f14a94 0736b45d
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment