From bf8a73c539ce324616c058f8e0a59836e78d015a 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 73e7377c26bfd..69762f6ecabed 100644 --- a/lib/private/Files/Node/Folder.php +++ b/lib/private/Files/Node/Folder.php @@ -314,7 +314,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()); } protected function getAppDataDirectoryName(): string {