summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2024-08-05 17:34:25 +0200
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2024-08-07 18:59:42 +0000
commita59176b7dc5ee64a3febf1b1a8630ae322464f5c (patch)
treeb5dcd3371bd28d7e6e82f36e78465d74d81c350f
parente056f5c579da3931986529bed22c0e1fd5b62759 (diff)
downloadnextcloud-server-a59176b7dc5ee64a3febf1b1a8630ae322464f5c.tar.gz
nextcloud-server-a59176b7dc5ee64a3febf1b1a8630ae322464f5c.zip
fix(encryption): Fix mountpoint check to accept if several are found
There is no strong requirement to have only one mount for a given storage id. Also the error in this case would be misleading. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
-rw-r--r--lib/private/Files/Storage/Wrapper/Encryption.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Files/Storage/Wrapper/Encryption.php b/lib/private/Files/Storage/Wrapper/Encryption.php
index 7ce4338256f..499ba1f317f 100644
--- a/lib/private/Files/Storage/Wrapper/Encryption.php
+++ b/lib/private/Files/Storage/Wrapper/Encryption.php
@@ -807,7 +807,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);