Skip to content

Commit 36890f8

Browse files
committed
Fixes microsoft#110377 and microsoft#135023 : Maintain query and fragment parts of uris when transforming them
1 parent 95bb2aa commit 36890f8

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/vs/base/common/uriIpc.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ export interface UriParts {
1717
scheme: string;
1818
authority?: string;
1919
path?: string;
20+
query?: string;
21+
fragment?: string;
2022
}
2123

2224
export interface IRawURITransformer {

src/vs/server/uriTransformer.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ module.exports = function(remoteAuthority) {
2828
*/
2929
transformIncoming: (uri) => {
3030
if (uri.scheme === 'vscode-remote') {
31-
return { scheme: 'file', path: uri.path };
31+
return { scheme: 'file', path: uri.path, query: uri.query, fragment: uri.fragment };
3232
}
3333
if (uri.scheme === 'file') {
34-
return { scheme: 'vscode-local', path: uri.path };
34+
return { scheme: 'vscode-local', path: uri.path, query: uri.query, fragment: uri.fragment };
3535
}
3636
return uri;
3737
},
@@ -41,10 +41,10 @@ module.exports = function(remoteAuthority) {
4141
*/
4242
transformOutgoing: (uri) => {
4343
if (uri.scheme === 'file') {
44-
return { scheme: 'vscode-remote', authority: remoteAuthority, path: uri.path };
44+
return { scheme: 'vscode-remote', authority: remoteAuthority, path: uri.path, query: uri.query, fragment: uri.fragment };
4545
}
4646
if (uri.scheme === 'vscode-local') {
47-
return { scheme: 'file', path: uri.path };
47+
return { scheme: 'file', path: uri.path, query: uri.query, fragment: uri.fragment };
4848
}
4949
return uri;
5050
},

0 commit comments

Comments
 (0)