diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-04-01 09:08:50 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-04-01 09:08:50 +0200 |
commit | 193a33a8ada641bb83f789da14b87f29230e0e3a (patch) | |
tree | 52573f5ce0224aac6347688c72d5678709e9cbc0 /lib/private/files/storage/wrapper | |
parent | b84746ce36424615aef91e49a5977fc9d15a17c7 (diff) | |
parent | d16553d2d8f651e1c3ba8cc60df52558cb253983 (diff) | |
download | nextcloud-server-193a33a8ada641bb83f789da14b87f29230e0e3a.tar.gz nextcloud-server-193a33a8ada641bb83f789da14b87f29230e0e3a.zip |
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/private/files/storage/wrapper')
-rw-r--r-- | lib/private/files/storage/wrapper/encryption.php | 9 |
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 * |