From e7a7b4a40184dc3da2c83e858c820625f660e48e Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 9 Feb 2024 09:54:52 +0100 Subject: perf: switch places that always use the first getById result to getFirstNodeById Signed-off-by: Robin Appelman --- lib/private/Files/Config/CachedMountInfo.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'lib/private/Files/Config') diff --git a/lib/private/Files/Config/CachedMountInfo.php b/lib/private/Files/Config/CachedMountInfo.php index 7c97135a565..19fa87aa090 100644 --- a/lib/private/Files/Config/CachedMountInfo.php +++ b/lib/private/Files/Config/CachedMountInfo.php @@ -97,12 +97,7 @@ class CachedMountInfo implements ICachedMountInfo { // TODO injection etc Filesystem::initMountPoints($this->getUser()->getUID()); $userNode = \OC::$server->getUserFolder($this->getUser()->getUID()); - $nodes = $userNode->getParent()->getById($this->getRootId()); - if (count($nodes) > 0) { - return $nodes[0]; - } else { - return null; - } + return $userNode->getParent()->getFirstNodeById($this->getRootId()); } /** -- cgit v1.2.3