summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2022-08-17 11:58:57 +0200
committerRobin Appelman <robin@icewind.nl>2022-08-17 11:58:57 +0200
commitb6f8b8da60c1349204d6aecf5c9781bb6193ef68 (patch)
tree251b1273b780367a54318309f73afe8ba981b667 /lib
parent312b719acf686f51065e83290cd88704d703a50c (diff)
downloadnextcloud-server-b6f8b8da60c1349204d6aecf5c9781bb6193ef68.tar.gz
nextcloud-server-b6f8b8da60c1349204d6aecf5c9781bb6193ef68.zip
directly build the search filter for shared storage instead of setting up the source cache
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/Cache/Wrapper/CacheJail.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/private/Files/Cache/Wrapper/CacheJail.php b/lib/private/Files/Cache/Wrapper/CacheJail.php
index 834c9fd3d72..996f0c02603 100644
--- a/lib/private/Files/Cache/Wrapper/CacheJail.php
+++ b/lib/private/Files/Cache/Wrapper/CacheJail.php
@@ -306,10 +306,14 @@ class CacheJail extends CacheWrapper {
}
public function getQueryFilterForStorage(): ISearchOperator {
+ return $this->addJailFilterQuery($this->getCache()->getQueryFilterForStorage());
+ }
+
+ protected function addJailFilterQuery(ISearchOperator $filter): ISearchOperator {
if ($this->getGetUnjailedRoot() !== '' && $this->getGetUnjailedRoot() !== '/') {
return new SearchBinaryOperator(ISearchBinaryOperator::OPERATOR_AND,
[
- $this->getCache()->getQueryFilterForStorage(),
+ $filter,
new SearchBinaryOperator(ISearchBinaryOperator::OPERATOR_OR,
[
new SearchComparison(ISearchComparison::COMPARE_EQUAL, 'path', $this->getGetUnjailedRoot()),
@@ -319,7 +323,7 @@ class CacheJail extends CacheWrapper {
]
);
} else {
- return $this->getCache()->getQueryFilterForStorage();
+ return $filter;
}
}