mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 12:19:20 +00:00
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user