summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-03-30 21:44:28 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-04-07 13:30:28 +0200
commit99255ff3a92b2d242f3c723979341951a303f83d (patch)
treeedcc8c97e3113cff977479d391090961614b7716 /lib
parente7a68d1c21c52a39ddec59579ab7701dfef82b2a (diff)
downloadnextcloud-server-99255ff3a92b2d242f3c723979341951a303f83d.tar.gz
nextcloud-server-99255ff3a92b2d242f3c723979341951a303f83d.zip
Fix - public sharing: in case on user is available - get it from the path
Diffstat (limited to 'lib')
-rw-r--r--lib/private/files/storage/wrapper/encryption.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/private/files/storage/wrapper/encryption.php b/lib/private/files/storage/wrapper/encryption.php
index 8892194f32b..cea7a38d41b 100644
--- a/lib/private/files/storage/wrapper/encryption.php
+++ b/lib/private/files/storage/wrapper/encryption.php
@@ -244,8 +244,13 @@ class Encryption extends Wrapper {
if($shouldEncrypt === true && !$this->util->isExcluded($fullPath) && $encryptionModule !== null) {
$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,
- $this->uid, $encryptionModule, $this->storage, $this, $this->util, $mode,
+ $uid, $encryptionModule, $this->storage, $this, $this->util, $mode,
$size, $unencryptedSize);
return $handle;
} else {