Skip to content

Commit

Permalink
fix: don't do same-storage move optimization with encryption wrappers
Browse files Browse the repository at this point in the history
Signed-off-by: Robin Appelman <[email protected]>
  • Loading branch information
icewind1991 authored and solracsf committed Jan 9, 2025
1 parent f6eee85 commit bb3e6ea
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/private/Files/Storage/Common.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
use OC\Files\Cache\Watcher;
use OC\Files\Filesystem;
use OC\Files\ObjectStore\ObjectStoreStorage;
use OC\Files\Storage\Wrapper\Encryption;
use OC\Files\Storage\Wrapper\Jail;
use OC\Files\Storage\Wrapper\Wrapper;
use OCP\Files\EmptyFileNameException;
Expand Down Expand Up @@ -687,7 +688,10 @@ private function isSameStorage(IStorage $storage): bool {
* @return bool
*/
public function moveFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath) {
if ($this->isSameStorage($sourceStorage)) {
if (
!$sourceStorage->instanceOfStorage(Encryption::class) &&
$this->isSameStorage($sourceStorage)
) {
// resolve any jailed paths
while ($sourceStorage->instanceOfStorage(Jail::class)) {
/**
Expand Down

0 comments on commit bb3e6ea

Please sign in to comment.