Skip to content

Commit

Permalink
Merge pull request #46017 from nextcloud/get-first-node-by-id-folder
Browse files Browse the repository at this point in the history
fix: also use optimized getFirstNodeyIdInPath for Folder::getFirstNodeById
  • Loading branch information
icewind1991 committed Jun 21, 2024
2 parents 425e2d0 + ffced73 commit da8e1c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/private/Files/Node/Folder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit da8e1c1

Please sign in to comment.