From ffced73a7110fbe8540701da16a278ddaa48306d Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 20 Jun 2024 17:29:19 +0200 Subject: [PATCH] fix: also use optimized getFirstNodeyIdInPath for Folder::getFirstNodeById Signed-off-by: Robin Appelman --- lib/private/Files/Node/Folder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/private/Files/Node/Folder.php b/lib/private/Files/Node/Folder.php index 51b205d545bcb..7ae55d046b9ea 100644 --- a/lib/private/Files/Node/Folder.php +++ b/lib/private/Files/Node/Folder.php @@ -289,7 +289,7 @@ public function getById($id) { } public function getFirstNodeById(int $id): ?\OCP\Files\Node { - return current($this->getById($id)) ?: null; + return $this->root->getFirstNodeByIdInPath($id, $this->getPath()); } public function getAppDataDirectoryName(): string {