From 4a049c20948df9edcba7e4feaa656483654ee0ac Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 23 Oct 2023 11:38:20 +0200 Subject: [PATCH] get children from dav node when preloading system tags Signed-off-by: Robin Appelman --- apps/dav/lib/SystemTag/SystemTagPlugin.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/dav/lib/SystemTag/SystemTagPlugin.php b/apps/dav/lib/SystemTag/SystemTagPlugin.php index c5d200d578e94..58f61c1323226 100644 --- a/apps/dav/lib/SystemTag/SystemTagPlugin.php +++ b/apps/dav/lib/SystemTag/SystemTagPlugin.php @@ -303,9 +303,11 @@ private function propfindForFile(PropFind $propFind, Node $node): void { $fileIds = [$node->getId()]; // note: pre-fetching only supported for depth <= 1 - $folderContent = $node->getNode()->getDirectoryListing(); + $folderContent = $node->getChildren(); foreach ($folderContent as $info) { - $fileIds[] = $info->getId(); + if ($info instanceof Node) { + $fileIds[] = $info->getId(); + } } $tags = $this->tagMapper->getTagIdsForObjects($fileIds, 'files');