From e7a7b4a40184dc3da2c83e858c820625f660e48e Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 9 Feb 2024 09:54:52 +0100 Subject: perf: switch places that always use the first getById result to getFirstNodeById Signed-off-by: Robin Appelman --- core/Command/Info/FileUtils.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'core/Command/Info') diff --git a/core/Command/Info/FileUtils.php b/core/Command/Info/FileUtils.php index 694f30f78b4..595a0216a5c 100644 --- a/core/Command/Info/FileUtils.php +++ b/core/Command/Info/FileUtils.php @@ -87,11 +87,7 @@ class FileUtils { } $mount = $mounts[0]; $userFolder = $this->rootFolder->getUserFolder($mount->getUser()->getUID()); - $nodes = $userFolder->getById((int)$fileInput); - if (!$nodes) { - return null; - } - return $nodes[0]; + return $userFolder->getFirstNodeById((int)$fileInput); } else { try { return $this->rootFolder->get($fileInput); -- cgit v1.2.3