File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -169,6 +169,7 @@ public function search(Query $search): array {
169169 if (!$ node instanceof Directory) {
170170 throw new \InvalidArgumentException ('Search is only supported on directories ' );
171171 }
172+
172173 $ fileInfo = $ node ->getFileInfo ();
173174 /** @var Folder $folder */
174175 $ folder = $ this ->rootFolder ->get ($ fileInfo ->getPath ());
@@ -179,11 +180,23 @@ public function search(Query $search): array {
179180 } else {
180181 $ internalPath = $ folder ->getInternalPath ();
181182 }
182- $ scopes [] = new SearchComparison (
183- ISearchComparison::COMPARE_LIKE ,
184- 'path ' ,
185- $ internalPath . '/% ' ,
186- ''
183+
184+ $ scopes [] = new SearchBinaryOperator (
185+ ISearchBinaryOperator::OPERATOR_AND ,
186+ [
187+ new SearchComparison (
188+ ISearchComparison::COMPARE_EQUAL ,
189+ 'storage ' ,
190+ $ folderStorage ->getCache ()->getNumericStorageId (),
191+ ''
192+ ),
193+ new SearchComparison (
194+ ISearchComparison::COMPARE_LIKE ,
195+ 'path ' ,
196+ $ internalPath . '/% ' ,
197+ ''
198+ ),
199+ ]
187200 );
188201 }
189202
You can’t perform that action at this time.
0 commit comments