Skip to content

Commit ab26dc7

Browse files
authored
fix(file search): searching by name&content does not search file name (#743)
* fix(file search): searching by name&content does not search file name * release note
1 parent 6ff6b46 commit ab26dc7

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

docs/content.en/docs/release-notes/_index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Information about release notes of Coco Server is provided here.
1818

1919
### 🐛 Bug fix
2020
- fix(file search): apply filters before from/size parameters #741
21+
- fix(file search): searching by name&content does not search file name #743
2122

2223
### ✈️ Improvements
2324

src-tauri/src/extension/built_in/file_search.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,10 @@ impl FileSearchExtensionSearchSource {
235235
args.push(format!("kMDItemFSName == '*{}*'", query_string));
236236
}
237237
SearchBy::NameAndContents => {
238-
args.push(format!("kMDItemTextContent == '{}'", query_string));
238+
args.push(format!(
239+
"kMDItemFSName == '*{}*' || kMDItemTextContent == '{}'",
240+
query_string, query_string
241+
));
239242
}
240243
}
241244

0 commit comments

Comments
 (0)