diff --git a/lib/private/Files/Cache/Cache.php b/lib/private/Files/Cache/Cache.php index 5c5146a569f3c00d54f12ee2f9d704f04c8b8c4d..92e81cd0f075fc1fd3c6d256288f0f49c84e680c 100644 --- a/lib/private/Files/Cache/Cache.php +++ b/lib/private/Files/Cache/Cache.php @@ -797,6 +797,10 @@ class Cache implements ICache { $query->andWhere($searchExpr); } + if ($searchQuery->limitToHome() && ($this instanceof HomeCache)) { + $query->andWhere($builder->expr()->like('path', $query->expr()->literal('files/%'))); + } + $this->querySearchHelper->addSearchOrdersToQuery($query, $searchQuery->getOrder()); if ($searchQuery->getLimit()) {