mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-18 15:55:59 +01:00
Open workspace from vscode:// url (fix #133976)
This commit is contained in:
@@ -846,9 +846,13 @@ export class CodeApplication extends Disposable {
|
||||
|
||||
// File path
|
||||
if (uri.authority === Schemas.file) {
|
||||
// we configure as fileUri, but later validation will
|
||||
// make sure to open as folder or workspace if possible
|
||||
return { fileUri: URI.file(uri.fsPath) };
|
||||
const fileUri = URI.file(uri.fsPath);
|
||||
|
||||
if (hasWorkspaceFileExtension(fileUri)) {
|
||||
return { workspaceUri: fileUri };
|
||||
}
|
||||
|
||||
return { fileUri };
|
||||
}
|
||||
|
||||
// Remote path
|
||||
@@ -864,11 +868,14 @@ export class CodeApplication extends Disposable {
|
||||
|
||||
if (hasWorkspaceFileExtension(path)) {
|
||||
return { workspaceUri: remoteUri };
|
||||
} else if (/:[\d]+$/.test(path)) { // path with :line:column syntax
|
||||
return { fileUri: remoteUri };
|
||||
} else {
|
||||
return { folderUri: remoteUri };
|
||||
}
|
||||
|
||||
if (/:[\d]+$/.test(path)) {
|
||||
// path with :line:column syntax
|
||||
return { fileUri: remoteUri };
|
||||
}
|
||||
|
||||
return { folderUri: remoteUri };
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user