From a59176b7dc5ee64a3febf1b1a8630ae322464f5c Mon Sep 17 00:00:00 2001 From: Côme Chilliet Date: Mon, 5 Aug 2024 17:34:25 +0200 Subject: fix(encryption): Fix mountpoint check to accept if several are found MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- lib/private/Files/Storage/Wrapper/Encryption.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/private/Files') 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); -- cgit v1.2.3