mirror of
https://github.com/Microsoft/vscode
synced 2024-09-19 18:48:00 +00:00
remove encodeURI(uri.toString(true)) workarounds
This commit is contained in:
parent
175ab4aa51
commit
92292f4fe4
|
@ -149,7 +149,7 @@ export class OpenerService extends Disposable implements IOpenerService {
|
|||
|
||||
private async _doOpenExternal(resource: URI, options: OpenOptions | undefined): Promise<boolean> {
|
||||
const { resolved } = await this.resolveExternalUri(resource, options);
|
||||
dom.windowOpenNoOpener(encodeURI(resolved.toString(true)));
|
||||
dom.windowOpenNoOpener(resolved.toString());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -37,16 +37,16 @@ export class WebviewPortMappingManager extends Disposable {
|
|||
if (tunnel.tunnelLocalPort === mapping.webviewPort) {
|
||||
return undefined;
|
||||
}
|
||||
return encodeURI(uri.with({
|
||||
return uri.with({
|
||||
authority: `127.0.0.1:${tunnel.tunnelLocalPort}`,
|
||||
}).toString(true));
|
||||
}).toString();
|
||||
}
|
||||
}
|
||||
|
||||
if (mapping.webviewPort !== mapping.extensionHostPort) {
|
||||
return encodeURI(uri.with({
|
||||
return uri.with({
|
||||
authority: `${requestLocalHostInfo.address}:${mapping.extensionHostPort}`
|
||||
}).toString(true));
|
||||
}).toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -408,7 +408,7 @@ export class ElectronWindow extends Disposable {
|
|||
// the main process to prevent window focus issues.
|
||||
if (this.shouldOpenExternal(resource, options)) {
|
||||
const { resolved } = await this.openerService.resolveExternalUri(resource, options);
|
||||
const success = await this.electronService.openExternal(encodeURI(resolved.toString(true)));
|
||||
const success = await this.electronService.openExternal(resolved.toString());
|
||||
if (!success && resolved.scheme === Schemas.file) {
|
||||
// if opening failed, and this is a file, we can still try to reveal it
|
||||
await this.electronService.showItemInFolder(resolved.fsPath);
|
||||
|
|
Loading…
Reference in a new issue