fix(FileAccess#getDistinctMounts): Order results deterministically

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
This commit is contained in:
Marcel Klehr 2025-04-04 10:15:23 +02:00
parent 10cc43041b
commit 34b3f7553b

View file

@ -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]);