From 34b3f7553bd1955e73a45270213a202aefa619c5 Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Fri, 4 Apr 2025 10:15:23 +0200 Subject: [PATCH] fix(FileAccess#getDistinctMounts): Order results deterministically Signed-off-by: Marcel Klehr --- lib/private/Files/Cache/FileAccess.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/private/Files/Cache/FileAccess.php b/lib/private/Files/Cache/FileAccess.php index 43aa9224b34..a1bb70a7f14 100644 --- a/lib/private/Files/Cache/FileAccess.php +++ b/lib/private/Files/Cache/FileAccess.php @@ -193,6 +193,7 @@ class FileAccess implements IFileAccess { if ($excludeMountPoints !== false) { $qb->andWhere($qb->expr()->notLike('mount_point', $qb->createPositionalParameter($excludeMountPoints))); } + $qb->orderBy('root_id', 'ASC'); $result = $qb->executeQuery(); @@ -217,7 +218,7 @@ class FileAccess implements IFileAccess { ->andWhere($qb->expr()->eq('filecache.path', $qb->createNamedParameter('files'))) ->executeQuery()->fetch(); if ($root !== false) { - $overrideRoot = intval($root['fileid']); + $overrideRoot = (int)$root['fileid']; } } catch (Exception $e) { $this->logger->error('Could not fetch home storage files root for storage ' . $storageId, ['exception' => $e]);