From 0bc478de2ca2745d85e30c7253f383e87e063e67 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 13 Nov 2024 18:47:13 +0100 Subject: fix: don't do same-storage move optimization with encryption wrappers Signed-off-by: Robin Appelman --- lib/private/Files/Storage/Common.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/private/Files/Storage/Common.php b/lib/private/Files/Storage/Common.php index 334ca34294e..f915b8f5565 100644 --- a/lib/private/Files/Storage/Common.php +++ b/lib/private/Files/Storage/Common.php @@ -16,6 +16,7 @@ use OC\Files\Cache\Watcher; use OC\Files\FilenameValidator; 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\Cache\ICache; @@ -546,7 +547,10 @@ abstract class Common implements Storage, ILockingStorage, IWriteStreamStorage, } public function moveFromStorage(IStorage $sourceStorage, string $sourceInternalPath, string $targetInternalPath): bool { - if ($this->isSameStorage($sourceStorage)) { + if ( + !$sourceStorage->instanceOfStorage(Encryption::class) && + $this->isSameStorage($sourceStorage) + ) { // resolve any jailed paths while ($sourceStorage->instanceOfStorage(Jail::class)) { /** -- cgit v1.2.3