Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion lib/private/Files/Storage/Wrapper/Encryption.php
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,16 @@ private function updateEncryptedVersion(Storage\IStorage $sourceStorage, $source
'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
Expand Down