Skip to content
Snippets Groups Projects
Commit 3736f138 authored by Vincent Petry's avatar Vincent Petry Committed by Lukas Reschke
Browse files

Check if partial cache entry or not in encryption wrapper

parent 966eb4b0
No related branches found
No related tags found
No related merge requests found
......@@ -39,6 +39,7 @@ use OCP\Encryption\Keys\IStorage;
use OCP\Files\Mount\IMountPoint;
use OCP\Files\Storage;
use OCP\ILogger;
use OCP\Files\Cache\ICacheEntry;
class Encryption extends Wrapper {
......@@ -129,11 +130,13 @@ class Encryption extends Wrapper {
if (isset($this->unencryptedSize[$fullPath])) {
$size = $this->unencryptedSize[$fullPath];
// update file cache
if ($info) {
if ($info instanceof ICacheEntry) {
$info = $info->getData();
$info['encrypted'] = $info['encryptedVersion'];
} else {
$info = [];
if (!is_array($info)) {
$info = [];
}
$info['encrypted'] = true;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment