From 9884dec64676799f182167bfc6170b89969c1a47 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 4 Mar 2026 18:43:55 +0100 Subject: [PATCH] fix: fix updating cached mounts with multiple entries for root id Signed-off-by: Robin Appelman --- lib/private/Files/Config/UserMountCache.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/private/Files/Config/UserMountCache.php b/lib/private/Files/Config/UserMountCache.php index ebdfc64d83e..281ab429904 100644 --- a/lib/private/Files/Config/UserMountCache.php +++ b/lib/private/Files/Config/UserMountCache.php @@ -194,15 +194,15 @@ class UserMountCache implements IUserMountCache { private function updateCachedMount(ICachedMountInfo $mount) { $builder = $this->connection->getQueryBuilder(); + $hash = hash('xxh128', $mount->getMountPoint()); $query = $builder->update('mounts') ->set('storage_id', $builder->createNamedParameter($mount->getStorageId())) - ->set('mount_point', $builder->createNamedParameter($mount->getMountPoint())) - ->set('mount_point_hash', $builder->createNamedParameter(hash('xxh128', $mount->getMountPoint()))) ->set('mount_id', $builder->createNamedParameter($mount->getMountId(), IQueryBuilder::PARAM_INT)) ->set('mount_provider_class', $builder->createNamedParameter($mount->getMountProvider())) ->where($builder->expr()->eq('user_id', $builder->createNamedParameter($mount->getUser()->getUID()))) - ->andWhere($builder->expr()->eq('root_id', $builder->createNamedParameter($mount->getRootId(), IQueryBuilder::PARAM_INT))); + ->andWhere($builder->expr()->eq('root_id', $builder->createNamedParameter($mount->getRootId(), IQueryBuilder::PARAM_INT))) + ->andWhere($builder->expr()->eq('mount_point_hash', $builder->createNamedParameter($hash))); $query->executeStatement(); }