Skip to content

Commit bb3e6ea

Browse files
icewind1991solracsf
authored andcommitted
fix: don't do same-storage move optimization with encryption wrappers
Signed-off-by: Robin Appelman <[email protected]>
1 parent f6eee85 commit bb3e6ea

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/private/Files/Storage/Common.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
use OC\Files\Cache\Watcher;
5151
use OC\Files\Filesystem;
5252
use OC\Files\ObjectStore\ObjectStoreStorage;
53+
use OC\Files\Storage\Wrapper\Encryption;
5354
use OC\Files\Storage\Wrapper\Jail;
5455
use OC\Files\Storage\Wrapper\Wrapper;
5556
use OCP\Files\EmptyFileNameException;
@@ -687,7 +688,10 @@ private function isSameStorage(IStorage $storage): bool {
687688
* @return bool
688689
*/
689690
public function moveFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath) {
690-
if ($this->isSameStorage($sourceStorage)) {
691+
if (
692+
!$sourceStorage->instanceOfStorage(Encryption::class) &&
693+
$this->isSameStorage($sourceStorage)
694+
) {
691695
// resolve any jailed paths
692696
while ($sourceStorage->instanceOfStorage(Jail::class)) {
693697
/**

0 commit comments

Comments
 (0)