diff options
author | Robin Appelman <robin@icewind.nl> | 2024-06-21 12:27:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-21 12:27:53 +0200 |
commit | da8e1c192d1ec8b9ed4ee0f6492746e5ec054669 (patch) | |
tree | 1c8520142f32cdba826fdbb96f010711b04e7fc2 /lib | |
parent | 425e2d0172625443e32b7e7178fc0bca0579d24a (diff) | |
parent | ffced73a7110fbe8540701da16a278ddaa48306d (diff) | |
download | nextcloud-server-da8e1c192d1ec8b9ed4ee0f6492746e5ec054669.tar.gz nextcloud-server-da8e1c192d1ec8b9ed4ee0f6492746e5ec054669.zip |
Merge pull request #46017 from nextcloud/get-first-node-by-id-folder
fix: also use optimized getFirstNodeyIdInPath for Folder::getFirstNodeById
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Files/Node/Folder.php | 2 |
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 { |