Skip to content

Commit 5fffbcf

Browse files
Merge pull request #44889 from nextcloud/bugfix/noid/skip-cross-storage-move-with-ac
fix(files): Also skip cross storage move with access control
2 parents 2161387 + 64d32ab commit 5fffbcf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/private/Files/Storage/Local.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -584,11 +584,14 @@ private function calculateEtag(string $path, array $stat): string {
584584
}
585585

586586
private function canDoCrossStorageMove(IStorage $sourceStorage) {
587+
/** @psalm-suppress UndefinedClass */
587588
return $sourceStorage->instanceOfStorage(Local::class)
588589
// Don't treat ACLStorageWrapper like local storage where copy can be done directly.
589590
// Instead, use the slower recursive copying in php from Common::copyFromStorage with
590591
// more permissions checks.
591592
&& !$sourceStorage->instanceOfStorage('OCA\GroupFolders\ACL\ACLStorageWrapper')
593+
// Same for access control
594+
&& !$sourceStorage->instanceOfStorage(\OCA\FilesAccessControl\StorageWrapper::class)
592595
// when moving encrypted files we have to handle keys and the target might not be encrypted
593596
&& !$sourceStorage->instanceOfStorage(Encryption::class);
594597
}

0 commit comments

Comments
 (0)