mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 02:28:34 +01:00
Reject invalid URI with vscode.openFolder (for #55891)
This commit is contained in:
@@ -48,6 +48,9 @@ export class OpenFolderAPICommand {
|
||||
if (!uri) {
|
||||
return executor.executeCommand('_files.pickFolderAndOpen', forceNewWindow);
|
||||
}
|
||||
if (!uri.scheme) {
|
||||
throw new Error(`Invalid URI, schema required: '${uri.toString()}'.`);
|
||||
}
|
||||
|
||||
return executor.executeCommand('_files.windowOpen', [uri], forceNewWindow);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user