提交 ef8bb5b8 编写于 作者: R Rob Lourens

Fix #60672 - don't start search if token is already canceled

上级 51103bd6
......@@ -461,6 +461,10 @@ export class DiskSearch implements ISearchResultProvider {
const folderQueries = query.folderQueries || [];
return TPromise.join(folderQueries.map(q => q.folder.scheme === Schemas.file && pfs.exists(q.folder.fsPath)))
.then(exists => {
if (token && token.isCancellationRequested) {
throw canceled();
}
const existingFolders = folderQueries.filter((q, index) => exists[index]);
const rawSearch = this.rawSearchQuery(query, existingFolders);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册