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:
commit
6ada1e3276
|
@ -419,10 +419,11 @@ class Encryption extends Wrapper {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($shouldEncrypt === true && $encryptionModule !== null) {
|
if ($shouldEncrypt === true && $encryptionModule !== null) {
|
||||||
|
$headerSize = $this->getHeaderSize($path);
|
||||||
$source = $this->storage->fopen($path, $mode);
|
$source = $this->storage->fopen($path, $mode);
|
||||||
$handle = \OC\Files\Stream\Encryption::wrap($source, $path, $fullPath, $header,
|
$handle = \OC\Files\Stream\Encryption::wrap($source, $path, $fullPath, $header,
|
||||||
$this->uid, $encryptionModule, $this->storage, $this, $this->util, $this->fileHelper, $mode,
|
$this->uid, $encryptionModule, $this->storage, $this, $this->util, $this->fileHelper, $mode,
|
||||||
$size, $unencryptedSize, $this->getHeaderSize($path));
|
$size, $unencryptedSize, $headerSize);
|
||||||
return $handle;
|
return $handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue