Fix - public sharing: in case on user is available - get it from the path

This commit is contained in:
Thomas Müller 2015-03-30 21:44:28 +02:00
parent e7a68d1c21
commit 99255ff3a9
1 changed files with 6 additions and 1 deletions

View File

@ -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 {