handle workspace uris

related to #124263
This commit is contained in:
João Moreno
2021-05-21 11:23:45 +02:00
parent 73c6f34f9e
commit a6f7aa5e4c
10 changed files with 145 additions and 15 deletions

View File

@@ -717,8 +717,16 @@ export class CodeApplication extends Disposable {
// protocol invocations outside of VSCode.
const app = this;
const environmentService = this.environmentMainService;
const productService = this.productService;
urlService.registerHandler({
async handleURL(uri: URI, options?: IOpenURLOptions): Promise<boolean> {
if (uri.scheme === productService.urlProtocol && uri.path === 'workspace') {
uri = uri.with({
authority: 'file',
path: URI.parse(uri.query).path,
query: ''
});
}
// If URI should be blocked, behave as if it's handled
if (app.shouldBlockURI(uri)) {