diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2015-07-31 15:44:27 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2015-07-31 17:14:32 +0200 |
commit | 51a67a54e06eb4119a56a0f9f21b79bdea7c43f3 (patch) | |
tree | 7c1cc31fa54742b10916c26e4a98790f1c821ca8 /lib/private/files/storage/wrapper/encryption.php | |
parent | de01951da32efdebfff4ddb21cd07328a2d28e31 (diff) | |
download | nextcloud-server-51a67a54e06eb4119a56a0f9f21b79bdea7c43f3.tar.gz nextcloud-server-51a67a54e06eb4119a56a0f9f21b79bdea7c43f3.zip |
always update file cache, the cache can handle partial data correctly if the file doesn't already exists in the file cache
Diffstat (limited to 'lib/private/files/storage/wrapper/encryption.php')
-rw-r--r-- | lib/private/files/storage/wrapper/encryption.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/private/files/storage/wrapper/encryption.php b/lib/private/files/storage/wrapper/encryption.php index 51aa13065c1..4ba9b21ddb4 100644 --- a/lib/private/files/storage/wrapper/encryption.php +++ b/lib/private/files/storage/wrapper/encryption.php @@ -127,12 +127,11 @@ class Encryption extends Wrapper { $info = $this->getCache()->get($path); if (isset($this->unencryptedSize[$fullPath])) { $size = $this->unencryptedSize[$fullPath]; + // update file cache + $info['encrypted'] = true; + $info['size'] = $size; + $this->getCache()->put($path, $info); - if (isset($info['fileid'])) { - $info['encrypted'] = true; - $info['size'] = $size; - $this->getCache()->put($path, $info); - } return $size; } |