Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-04-01 10:08:50 +0300
committerThomas Müller <thomas.mueller@tmit.eu>2016-04-01 10:08:50 +0300
commit193a33a8ada641bb83f789da14b87f29230e0e3a (patch)
tree52573f5ce0224aac6347688c72d5678709e9cbc0 /lib
parentb84746ce36424615aef91e49a5977fc9d15a17c7 (diff)
parentd16553d2d8f651e1c3ba8cc60df52558cb253983 (diff)
Merge pull request #23709 from owncloud/stable9-make-sure-that-encrypted-version-is-set
[stable9] Make sure that the encrypted version is set
Diffstat (limited to 'lib')
-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 2c8de38ddd2..8b9832d7e36 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
*