Skip to content

Commit bf8b93e

Browse files
authored
Merge pull request #45258 from nextcloud/bug/noid/get-mounts-for-fileid-may-return-and-unindexed-list
fix: getMountsForFileId may return an unordered list
2 parents e68544d + 69883ac commit bf8b93e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

core/Command/Info/FileUtils.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function getNode(string $fileInput): ?Node {
8585
if (!$mounts) {
8686
return null;
8787
}
88-
$mount = $mounts[0];
88+
$mount = reset($mounts);
8989
$userFolder = $this->rootFolder->getUserFolder($mount->getUser()->getUID());
9090
return $userFolder->getFirstNodeById((int)$fileInput);
9191
} else {

0 commit comments

Comments
 (0)