SearchProvider - fix NPE when searching extraFileResources

This commit is contained in:
Rob Lourens
2018-08-01 21:27:18 -07:00
parent ec78bd91fa
commit c86cab2211

View File

@@ -669,9 +669,16 @@ class FileSearchManager {
}
private rawMatchToSearchItem(match: IInternalFileMatch): IFileMatch {
return {
resource: resources.joinPath(match.base, match.relativePath)
};
if (match.relativePath) {
return {
resource: resources.joinPath(match.base, match.relativePath)
};
} else {
// extraFileResources
return {
resource: match.base
};
}
}
private doSearch(engine: FileSearchEngine, batchSize: number, onResultBatch: (matches: IInternalFileMatch[]) => void): TPromise<IInternalSearchComplete> {