This commit is contained in:
Jean Pierre 2021-08-16 18:47:23 -05:00 committed by GitHub
parent 520fa49e68
commit c094fcf995
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -99,13 +99,14 @@ export class OpenDocumentLinkCommand implements Command {
let stat: vscode.FileStat;
try {
stat = await vscode.workspace.fs.stat(resource);
if (stat.type === vscode.FileType.Directory) {
await vscode.commands.executeCommand('revealInExplorer', resource);
return true;
}
} catch {
return false;
}
if (stat.type === vscode.FileType.Directory) {
await vscode.commands.executeCommand('revealInExplorer', resource);
return true;
// noop
// If resource doesn't exist, execute `vscode.open` either way so an error
// notification is shown to the user with a create file action #113475
}
try {