From 30028bb9ac95d3c6d2103b8fc1efd7a76df26fb3 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Fri, 12 May 2023 12:10:38 +0200 Subject: [PATCH] fix: no search when LazyFolder was provided Signed-off-by: Arthur Schiwon --- apps/dav/lib/Connector/Sabre/FilesReportPlugin.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php b/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php index 4cccdc842b9..2cae9d948b5 100644 --- a/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php +++ b/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php @@ -27,6 +27,7 @@ */ namespace OCA\DAV\Connector\Sabre; +use OC\Files\Node\LazyFolder; use OC\Files\View; use OCP\App\IAppManager; use OCP\Files\Folder; @@ -332,7 +333,11 @@ class FilesReportPlugin extends ServerPlugin { // type check to ensure searchBySystemTag is available, it is not // exposed in API yet - if (!empty($systemTagIds) && $this->userFolder instanceof \OC\Files\Node\Folder) { + if ( + !empty($systemTagIds) + && ($this->userFolder instanceof \OC\Files\Node\Folder + || $this->userFolder instanceof LazyFolder) + ) { $tags = $this->tagManager->getTagsByIds($systemTagIds); $tagName = (current($tags))->getName(); $nodes = $this->userFolder->searchBySystemTag($tagName, $this->userSession->getUser()->getUID(), $limit ?? 0, $offset ?? 0); -- 2.39.5