Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: no search when LazyFolder was provided
Signed-off-by: Arthur Schiwon <[email protected]>
  • Loading branch information
blizzz committed Jul 7, 2023
commit 8d252731927fa7cb129d099d0b2b80711756db61
7 changes: 6 additions & 1 deletion apps/dav/lib/Connector/Sabre/FilesReportPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -332,7 +333,11 @@ protected function processFilterRulesForFileNodes(array $filterRules, ?int $limi

// 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);
Expand Down