summaryrefslogtreecommitdiffstats
path: root/lib/private/files/stream
diff options
context:
space:
mode:
authorjknockaert <jasper@knockaert.nl>2015-04-21 14:43:08 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2015-04-24 16:44:00 +0200
commit1756562501e3201ed21a6f8a26b53c6bfdf12934 (patch)
tree654acfd4b4f333581709004abe5b38508e40cb05 /lib/private/files/stream
parent735f6cc0371f5e5c5d84a5ea4189f23104302ed1 (diff)
downloadnextcloud-server-1756562501e3201ed21a6f8a26b53c6bfdf12934.tar.gz
nextcloud-server-1756562501e3201ed21a6f8a26b53c6bfdf12934.zip
Update encryption.php
Diffstat (limited to 'lib/private/files/stream')
-rw-r--r--lib/private/files/stream/encryption.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/private/files/stream/encryption.php b/lib/private/files/stream/encryption.php
index 936bcb71e71..2e73e2927a7 100644
--- a/lib/private/files/stream/encryption.php
+++ b/lib/private/files/stream/encryption.php
@@ -229,6 +229,14 @@ class Encryption extends Wrapper {
$this->readOnly = true;
}
+ $sharePath = $this->fullPath;
+ if (!$this->storage->file_exists($this->internalPath)) {
+ $sharePath = dirname($sharePath);
+ }
+
+ $accessList = $this->file->getAccessList($sharePath);
+ $this->newHeader = $this->encryptionModule->begin($this->fullPath, $this->uid, $this->header, $accessList);
+
if (
$mode === 'w'
|| $mode === 'w+'
@@ -243,14 +251,6 @@ class Encryption extends Wrapper {
parent::stream_read($this->util->getHeaderSize());
}
- $sharePath = $this->fullPath;
- if (!$this->storage->file_exists($this->internalPath)) {
- $sharePath = dirname($sharePath);
- }
-
- $accessList = $this->file->getAccessList($sharePath);
- $this->newHeader = $this->encryptionModule->begin($this->fullPath, $this->uid, $this->header, $accessList);
-
return true;
}