mirror of
https://github.com/nextcloud/server.git
synced 2026-05-21 01:25:29 -04:00
Merge pull request #30694 from nextcloud/backport/30631/stable22
[stable22] updateEncryptedVersion: cleanup on target if cache already got renamed
This commit is contained in:
commit
293e5550e9
1 changed files with 10 additions and 1 deletions
|
|
@ -666,7 +666,16 @@ class Encryption extends Wrapper {
|
|||
'encrypted' => $isEncrypted,
|
||||
];
|
||||
if ($isEncrypted) {
|
||||
$encryptedVersion = $sourceStorage->getCache()->get($sourceInternalPath)['encryptedVersion'];
|
||||
$sourceCacheEntry = $sourceStorage->getCache()->get($sourceInternalPath);
|
||||
$targetCacheEntry = $this->getCache()->get($targetInternalPath);
|
||||
|
||||
// Rename of the cache already happened, so we do the cleanup on the target
|
||||
if ($sourceCacheEntry === false && $targetCacheEntry !== false) {
|
||||
$encryptedVersion = $targetCacheEntry['encryptedVersion'];
|
||||
$isRename = false;
|
||||
} else {
|
||||
$encryptedVersion = $sourceCacheEntry['encryptedVersion'];
|
||||
}
|
||||
|
||||
// In case of a move operation from an unencrypted to an encrypted
|
||||
// storage the old encrypted version would stay with "0" while the
|
||||
|
|
|
|||
Loading…
Reference in a new issue