summaryrefslogtreecommitdiffstats
path: root/lib/private/files/storage/wrapper
diff options
context:
space:
mode:
authorFrank Karlitschek <karlitschek@gmx.de>2016-03-31 20:37:17 +0200
committerFrank Karlitschek <karlitschek@gmx.de>2016-03-31 20:37:17 +0200
commit2bff34be56f0127dee3e61960d7cdc97b5a834f6 (patch)
treed7cb4562cd52bf0fb9cc92a152cfe99febb128be /lib/private/files/storage/wrapper
parentfdb59079a26b605544bfd76fdd2254e73f27d316 (diff)
parentc427bf3b5d2bab5f1e243bb9985588816773969a (diff)
downloadnextcloud-server-2bff34be56f0127dee3e61960d7cdc97b5a834f6.tar.gz
nextcloud-server-2bff34be56f0127dee3e61960d7cdc97b5a834f6.zip
Merge pull request #23707 from owncloud/make-sure-that-encrypted-version-is-set
Make sure that the encrypted version is set
Diffstat (limited to 'lib/private/files/storage/wrapper')
-rw-r--r--lib/private/files/storage/wrapper/encryption.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/private/files/storage/wrapper/encryption.php b/lib/private/files/storage/wrapper/encryption.php
index 49515fbcc57..4e116babd3f 100644
--- a/lib/private/files/storage/wrapper/encryption.php
+++ b/lib/private/files/storage/wrapper/encryption.php
@@ -110,7 +110,7 @@ class Encryption extends Wrapper {
Manager $mountManager = null,
ArrayCache $arrayCache = null
) {
-
+
$this->mountPoint = $parameters['mountPoint'];
$this->mount = $parameters['mount'];
$this->encryptionManager = $encryptionManager;
@@ -174,20 +174,25 @@ class Encryption extends Wrapper {
return null;
}
$fullPath = $this->getFullPath($path);
+ $info = $this->getCache()->get($path);
if (isset($this->unencryptedSize[$fullPath])) {
$data['encrypted'] = true;
$data['size'] = $this->unencryptedSize[$fullPath];
} else {
- $info = $this->getCache()->get($path);
if (isset($info['fileid']) && $info['encrypted']) {
$data['size'] = $this->verifyUnencryptedSize($path, $info['size']);
$data['encrypted'] = true;
}
}
+ if (isset($info['encryptedVersion']) && $info['encryptedVersion'] > 1) {
+ $data['encryptedVersion'] = $info['encryptedVersion'];
+ }
+
return $data;
}
+
/**
* see http://php.net/manual/en/function.file_get_contents.php
*