mirror of
https://github.com/nextcloud/server.git
synced 2026-06-05 23:06:48 -04:00
fix: use mountpoint from storage to find the encryption keys
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
52da5f715f
commit
c2af3e04b0
1 changed files with 3 additions and 3 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue