aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2024-06-20 17:29:19 +0200
committerRobin Appelman <robin@icewind.nl>2024-06-20 18:51:27 +0200
commitffced73a7110fbe8540701da16a278ddaa48306d (patch)
tree19525d0e5a63b4a4cb5ce14a32ee6468e7f47d89
parent9c4b95969002973d3ed39c0782d5a4bd3bc9f6b5 (diff)
downloadnextcloud-server-ffced73a7110fbe8540701da16a278ddaa48306d.tar.gz
nextcloud-server-ffced73a7110fbe8540701da16a278ddaa48306d.zip
fix: also use optimized getFirstNodeyIdInPath for Folder::getFirstNodeById
Signed-off-by: Robin Appelman <robin@icewind.nl>
-rw-r--r--lib/private/Files/Node/Folder.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Files/Node/Folder.php b/lib/private/Files/Node/Folder.php
index 51b205d545b..7ae55d046b9 100644
--- a/lib/private/Files/Node/Folder.php
+++ b/lib/private/Files/Node/Folder.php
@@ -289,7 +289,7 @@ class Folder extends Node implements \OCP\Files\Folder {
}
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 {