get children from dav node when preloading system tags

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2023-10-23 11:38:20 +02:00 committed by backportbot-nextcloud[bot]
parent 3be53b236f
commit e46ef2b355

View file

@ -303,9 +303,11 @@ class SystemTagPlugin extends \Sabre\DAV\ServerPlugin {
$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');