diff options
author | Robin Appelman <robin@icewind.nl> | 2024-08-20 13:32:03 +0200 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2024-08-20 14:22:44 +0000 |
commit | cf2826d1f72fa51842f01004eb3e5207a4b3e418 (patch) | |
tree | 376825790e5a2994b57d3609508d054df10817b5 /lib/private | |
parent | e9fcf6bc9c141f974495730bbd4b1e9e5a2db021 (diff) | |
download | nextcloud-server-cf2826d1f72fa51842f01004eb3e5207a4b3e418.tar.gz nextcloud-server-cf2826d1f72fa51842f01004eb3e5207a4b3e418.zip |
fix: use mountpoint from storage to find the encryption keys
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/Files/Storage/Wrapper/Encryption.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/Files/Storage/Wrapper/Encryption.php b/lib/private/Files/Storage/Wrapper/Encryption.php index bce4674caed..bae2362cea2 100644 --- a/lib/private/Files/Storage/Wrapper/Encryption.php +++ b/lib/private/Files/Storage/Wrapper/Encryption.php @@ -44,6 +44,7 @@ use OC\Files\Cache\CacheEntry; use OC\Files\Filesystem; use OC\Files\Mount\Manager; use OC\Files\ObjectStore\ObjectStoreStorage; +use OC\Files\Storage\Common; use OC\Files\Storage\LocalTempFileTrait; use OC\Memcache\ArrayCache; use OCP\Cache\CappedMemoryCache; @@ -806,9 +807,8 @@ 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) { - $mountPoint = $mount[0]->getMountPoint(); + if ($sourceStorage->instanceOfStorage(Common::class) && $sourceStorage->getMountOption('mount_point')) { + $mountPoint = $sourceStorage->getMountOption('mount_point'); $source = $mountPoint . '/' . $sourceInternalPath; $target = $this->getFullPath($targetInternalPath); $this->copyKeys($source, $target); |