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.
This commit is contained in:
Vincent Petry 2016-02-09 22:34:22 +01:00 committed by Lukas Reschke
parent 6724f76573
commit 45c78476f5

View file

@ -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]);
}
}