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.
remotes/origin/users-ajaxloadgroups
Vincent Petry 10 years ago committed by Lukas Reschke
parent 6724f76573
commit 45c78476f5
  1. 2
      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]);
}
}

Loading…
Cancel
Save