diff options
author | Frank Karlitschek <karlitschek@gmx.de> | 2016-03-31 20:37:17 +0200 |
---|---|---|
committer | Frank Karlitschek <karlitschek@gmx.de> | 2016-03-31 20:37:17 +0200 |
commit | 2bff34be56f0127dee3e61960d7cdc97b5a834f6 (patch) | |
tree | d7cb4562cd52bf0fb9cc92a152cfe99febb128be /lib/private/files/storage/wrapper/encryption.php | |
parent | fdb59079a26b605544bfd76fdd2254e73f27d316 (diff) | |
parent | c427bf3b5d2bab5f1e243bb9985588816773969a (diff) | |
download | nextcloud-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/encryption.php')
-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 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 * |