diff --git a/lib/Db/MountRequest.php b/lib/Db/MountRequest.php index cd9d94e63..910978fd5 100644 --- a/lib/Db/MountRequest.php +++ b/lib/Db/MountRequest.php @@ -55,8 +55,8 @@ public function save(Mount $mount): void { ->setValue('single_id', $qb->createNamedParameter($mount->getOwner()->getSingleId())) ->setValue('token', $qb->createNamedParameter($mount->getToken())) ->setValue('parent', $qb->createNamedParameter($mount->getParent())) - ->setValue('mountpoint', $qb->createNamedParameter($mount->getMountPoint())) - ->setValue('mountpoint_hash', $qb->createNamedParameter(md5($mount->getMountPoint()))); + ->setValue('mountpoint', $qb->createNamedParameter($mount->getOriginalMountPoint())) + ->setValue('mountpoint_hash', $qb->createNamedParameter(md5($mount->getOriginalMountPoint()))); $qb->execute(); } diff --git a/lib/Migration/Version0031Date20241105133904.php b/lib/Migration/Version0031Date20241105133904.php index 54d68e4a3..eb20f40b8 100644 --- a/lib/Migration/Version0031Date20241105133904.php +++ b/lib/Migration/Version0031Date20241105133904.php @@ -30,7 +30,7 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt try { $table = $schema->getTable('circles_mountpoint'); - if (!$table->hasIndex('dname')) { + if (!$table->hasIndex('mp_sid_hash')) { $table->addUniqueIndex(['single_id', 'mountpoint_hash'], 'mp_sid_hash'); } } catch (SchemaException $e) { diff --git a/lib/MountManager/CircleMountProvider.php b/lib/MountManager/CircleMountProvider.php index e4ad23f0c..213f250a8 100644 --- a/lib/MountManager/CircleMountProvider.php +++ b/lib/MountManager/CircleMountProvider.php @@ -62,8 +62,6 @@ class CircleMountProvider implements IMountProvider { use TArrayTools; - public const EXTERNAL_STORAGE = ExternalStorage::class; - public function __construct( private IClientService $clientService, private IRootFolder $rootFolder, @@ -72,7 +70,8 @@ public function __construct( private MountRequest $mountRequest, private MountPointRequest $mountPointRequest, private FederatedUserService $federatedUserService, - private ConfigService $configService + private ConfigService $configService, + private LoggerInterface $logger, ) { } @@ -129,7 +128,7 @@ public function generateCircleMount(Mount $mount, IStorageFactory $storageFactor return new CircleMount( $mount, - self::EXTERNAL_STORAGE, + ExternalStorage::class, $storageFactory ); }