summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2016-02-09 22:34:22 +0100
committerLukas Reschke <lukas@owncloud.com>2016-02-09 23:43:28 +0100
commit45c78476f5baed56e4e8158ed5283057f35366dd (patch)
tree69fdea8cc795c521635bef5bddaa545cb38ac774
parent6724f765733fa67f6f3e3fd0fb6a6a23eaaa127b (diff)
downloadnextcloud-server-45c78476f5baed56e4e8158ed5283057f35366dd.tar.gz
nextcloud-server-45c78476f5baed56e4e8158ed5283057f35366dd.zip
Use cache update instead of put for encryption version
Saves a call to fetch the file id which didn't even work for a reason. This fix properly sets the version in the database.
-rw-r--r--apps/encryption/lib/keymanager.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/encryption/lib/keymanager.php b/apps/encryption/lib/keymanager.php
index 57a8155e7b9..0c957e12012 100644
--- a/apps/encryption/lib/keymanager.php
+++ b/apps/encryption/lib/keymanager.php
@@ -441,7 +441,7 @@ class KeyManager {
if($fileInfo !== false) {
$cache = $fileInfo->getStorage()->getCache();
- $cache->put($path, ['fileid' => $fileInfo->getId(), 'encrypted' => $version, 'encryptedVersion' => $version]);
+ $cache->update($fileInfo->getId(), ['encrypted' => $version, 'encryptedVersion' => $version]);
}
}