Skip to content

Commit d6e8ec1

Browse files
Merge pull request #45007 from nextcloud/backport/44892/stable26
[stable26] fix(files): Also skip cross storage move with access control
2 parents d4185fe + 404fe47 commit d6e8ec1

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
@@ -588,11 +588,14 @@ private function calculateEtag(string $path, array $stat): string {
588588
}
589589

590590
private function canDoCrossStorageMove(IStorage $sourceStorage) {
591+
/** @psalm-suppress UndefinedClass */
591592
return $sourceStorage->instanceOfStorage(Local::class)
592593
// Don't treat ACLStorageWrapper like local storage where copy can be done directly.
593594
// Instead, use the slower recursive copying in php from Common::copyFromStorage with
594595
// more permissions checks.
595596
&& !$sourceStorage->instanceOfStorage('OCA\GroupFolders\ACL\ACLStorageWrapper')
597+
// Same for access control
598+
&& !$sourceStorage->instanceOfStorage(\OCA\FilesAccessControl\StorageWrapper::class)
596599
// when moving encrypted files we have to handle keys and the target might not be encrypted
597600
&& !$sourceStorage->instanceOfStorage(Encryption::class);
598601
}

0 commit comments

Comments
 (0)