mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 11:08:51 +01:00
careful with Promise(async () =>
This commit is contained in:
@@ -163,15 +163,14 @@ export class ExtensionHostMain {
|
||||
return this._diskSearch.search(query).then(result => result.results.length ? p : undefined);
|
||||
} else {
|
||||
// find exact path
|
||||
return new TPromise<string>(async resolve => {
|
||||
return (async resolve => {
|
||||
for (const { fsPath } of this._workspace.roots) {
|
||||
if (await pfs.exists(join(fsPath, p))) {
|
||||
resolve(p);
|
||||
return;
|
||||
return p;
|
||||
}
|
||||
}
|
||||
resolve(undefined);
|
||||
});
|
||||
return undefined;
|
||||
})();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user