mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-12 17:48:19 +01:00
editors - document why we activate
This commit is contained in:
@@ -1093,11 +1093,13 @@ export async function pathsToEditors(paths: IPathData[] | undefined, fileService
|
||||
|
||||
const editors = await Promise.all(paths.map(async path => {
|
||||
const resource = URI.revive(path.fileUri);
|
||||
|
||||
if (!resource) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Since we are possibly the first ones to use the file service
|
||||
// on the resource, we must ensure to activate the provider first
|
||||
// before asking whether the resource can be handled.
|
||||
await fileService.activateProvider(resource.scheme);
|
||||
|
||||
if (!fileService.canHandleResource(resource)) {
|
||||
|
||||
Reference in New Issue
Block a user