diff options
author | Robin Appelman <robin@icewind.nl> | 2024-08-20 13:32:03 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2024-08-20 13:32:03 +0200 |
commit | 3756152cb15d849457de6631c32758aa982e0a5f (patch) | |
tree | d2417d971edff58c89a628861efa1d351c34d9b4 /lib | |
parent | 107120105231f6d3402a204efb15854a0971fc64 (diff) | |
download | nextcloud-server-3756152cb15d849457de6631c32758aa982e0a5f.tar.gz nextcloud-server-3756152cb15d849457de6631c32758aa982e0a5f.zip |
fix: use mountpoint from storage to find the encryption keys
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib')
-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 7d45c356bfe..09048c239ee 100644 --- a/lib/private/Files/Storage/Wrapper/Encryption.php +++ b/lib/private/Files/Storage/Wrapper/Encryption.php @@ -14,6 +14,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; @@ -776,9 +777,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); |