Change File search result API to only return a string relative path to the search folder

This commit is contained in:
Rob Lourens
2018-05-17 21:51:10 -07:00
parent 707a20f4af
commit 912fff91ac
5 changed files with 50 additions and 43 deletions

View File

@@ -611,15 +611,12 @@ class FileSearchEngine {
const queryTester = new QueryGlobTester(this.config, fq);
const noSiblingsClauses = !queryTester.hasSiblingExcludeClauses();
const onProviderResult = (result: URI) => {
const onProviderResult = (relativePath: string) => {
if (this.isCanceled) {
return;
}
// TODO@roblou - What if it is not relative to the folder query.
// This is slow...
const relativePath = path.relative(folderStr, result.fsPath);
if (noSiblingsClauses) {
if (relativePath === this.filePattern) {
filePatternSeen = true;