Skip to content

Commit 69883ac

Browse files
committed
fix: getMountsForFileId may return an unordered list
Signed-off-by: Daniel Kesselberg <[email protected]>
1 parent f6d4af8 commit 69883ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)