Merge pull request #45258 from nextcloud/bug/noid/get-mounts-for-fileid-may-return-and-unindexed-list

fix: getMountsForFileId may return an unordered list
This commit is contained in:
Côme Chilliet 2024-05-13 11:43:26 +02:00 committed by GitHub
commit bf8b93e530
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -85,7 +85,7 @@ class FileUtils {
if (!$mounts) {
return null;
}
$mount = $mounts[0];
$mount = reset($mounts);
$userFolder = $this->rootFolder->getUserFolder($mount->getUser()->getUID());
return $userFolder->getFirstNodeById((int)$fileInput);
} else {