Fix - public sharing: in case on user is available - get it from the path
This commit is contained in:
parent
e7a68d1c21
commit
99255ff3a9
|
@ -244,8 +244,13 @@ class Encryption extends Wrapper {
|
||||||
|
|
||||||
if($shouldEncrypt === true && !$this->util->isExcluded($fullPath) && $encryptionModule !== null) {
|
if($shouldEncrypt === true && !$this->util->isExcluded($fullPath) && $encryptionModule !== null) {
|
||||||
$source = $this->storage->fopen($path, $mode);
|
$source = $this->storage->fopen($path, $mode);
|
||||||
|
$uid = $this->uid;
|
||||||
|
if (is_null($uid)) {
|
||||||
|
list($owner, ) = $this->util->getUidAndFilename($fullPath);
|
||||||
|
$uid = $owner;
|
||||||
|
}
|
||||||
$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, $mode,
|
$uid, $encryptionModule, $this->storage, $this, $this->util, $mode,
|
||||||
$size, $unencryptedSize);
|
$size, $unencryptedSize);
|
||||||
return $handle;
|
return $handle;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue