Skip to content

Commit ce786e0

Browse files
authored
Merge pull request #131 from manGitAcc/1.6
1.6
2 parents e893c58 + b6eb09c commit ce786e0

File tree

2 files changed

+29
-5
lines changed

2 files changed

+29
-5
lines changed

patched-vscode/src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import { getServiceMachineId } from 'vs/platform/externalServices/common/service
1616
import { IStorageService } from 'vs/platform/storage/common/storage';
1717
import { TelemetryLevel } from 'vs/platform/telemetry/common/telemetry';
1818
import { getTelemetryLevel, supportsTelemetry } from 'vs/platform/telemetry/common/telemetryUtils';
19-
import { RemoteAuthorities } from 'vs/base/common/network';
2019
import { TargetPlatform } from 'vs/platform/extensions/common/extensions';
2120

2221
const WEB_EXTENSION_RESOURCE_END_POINT_SEGMENT = '/web-extension-resource/';
@@ -141,9 +140,9 @@ export abstract class AbstractExtensionResourceLoaderService implements IExtensi
141140
}
142141

143142
protected _isWebExtensionResourceEndPoint(uri: URI): boolean {
144-
const uriPath = uri.path, serverRootPath = RemoteAuthorities.getServerRootPath();
145-
// test if the path starts with the server root path followed by the web extension resource end point segment
146-
return uriPath.startsWith(serverRootPath) && uriPath.startsWith(WEB_EXTENSION_RESOURCE_END_POINT_SEGMENT, serverRootPath.length);
143+
const uriPath = uri.path;
144+
// test if the path starts with the web extension resource end point segment
145+
return uriPath.startsWith(WEB_EXTENSION_RESOURCE_END_POINT_SEGMENT);
147146
}
148147

149148
}

patches/custom-extensions-marketplace.diff

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ Index: sagemaker-code-editor/vscode/src/vs/server/node/webClientServer.ts
9898
===================================================================
9999
--- sagemaker-code-editor.orig/vscode/src/vs/server/node/webClientServer.ts
100100
+++ sagemaker-code-editor/vscode/src/vs/server/node/webClientServer.ts
101-
@@ -320,14 +320,7 @@ export class WebClientServer {
101+
@@ -331,14 +331,7 @@ export class WebClientServer {
102102
const productConfiguration = {
103103
rootEndpoint: base,
104104
embedderIdentifier: 'server-distro',
@@ -134,3 +134,28 @@ Index: sagemaker-code-editor/vscode/product.json
134134
"linkProtectionTrustedDomains": [
135135
"https://open-vsx.org"
136136
]
137+
Index: sagemaker-code-editor/vscode/src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.ts
138+
===================================================================
139+
--- sagemaker-code-editor.orig/vscode/src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.ts
140+
+++ sagemaker-code-editor/vscode/src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.ts
141+
@@ -16,7 +16,6 @@ import { getServiceMachineId } from 'vs/
142+
import { IStorageService } from 'vs/platform/storage/common/storage';
143+
import { TelemetryLevel } from 'vs/platform/telemetry/common/telemetry';
144+
import { getTelemetryLevel, supportsTelemetry } from 'vs/platform/telemetry/common/telemetryUtils';
145+
-import { RemoteAuthorities } from 'vs/base/common/network';
146+
import { TargetPlatform } from 'vs/platform/extensions/common/extensions';
147+
148+
const WEB_EXTENSION_RESOURCE_END_POINT_SEGMENT = '/web-extension-resource/';
149+
@@ -141,9 +140,9 @@ export abstract class AbstractExtensionR
150+
}
151+
152+
protected _isWebExtensionResourceEndPoint(uri: URI): boolean {
153+
- const uriPath = uri.path, serverRootPath = RemoteAuthorities.getServerRootPath();
154+
- // test if the path starts with the server root path followed by the web extension resource end point segment
155+
- return uriPath.startsWith(serverRootPath) && uriPath.startsWith(WEB_EXTENSION_RESOURCE_END_POINT_SEGMENT, serverRootPath.length);
156+
+ const uriPath = uri.path;
157+
+ // test if the path starts with the web extension resource end point segment
158+
+ return uriPath.startsWith(WEB_EXTENSION_RESOURCE_END_POINT_SEGMENT);
159+
}
160+
161+
}

0 commit comments

Comments
 (0)