Merge pull request #47044 from nextcloud/fix/accept-several-mounts-in-encryption

fix(encryption): Fix mountpoint check to accept if several are found
pull/47031/head
Andy Scherzinger 2024-08-07 20:58:19 +07:00 committed by GitHub
commit 609fa7d5db
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

@ -777,7 +777,7 @@ class Encryption extends Wrapper {
// first copy the keys that we reuse the existing file key on the target location
// and don't create a new one which would break versions for example.
$mount = $this->mountManager->findByStorageId($sourceStorage->getId());
if (count($mount) === 1) {
if (count($mount) >= 1) {
$mountPoint = $mount[0]->getMountPoint();
$source = $mountPoint . '/' . $sourceInternalPath;
$target = $this->getFullPath($targetInternalPath);