From 45c78476f5baed56e4e8158ed5283057f35366dd Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Tue, 9 Feb 2016 22:34:22 +0100 Subject: 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. --- apps/encryption/lib/keymanager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps/encryption/lib') 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]); } } -- cgit v1.2.3