mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
Fix #60672 - don't start search if token is already canceled
This commit is contained in:
parent
51103bd6c6
commit
ef8bb5b845
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue