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

fix(encryption): Fix mountpoint check to accept if several are found
This commit is contained in:
Andy Scherzinger 2024-08-07 20:58:19 +02:00 committed by GitHub
commit 609fa7d5db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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);