mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-20 00:28:52 +01:00
fixes issue with asExternalUri API
This commit is contained in:
@@ -321,14 +321,20 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
||||
return extHostUrls.createAppUri(uri);
|
||||
}
|
||||
|
||||
if (!matchesScheme(uri, Schemas.http) && !matchesScheme(uri, Schemas.https)) {
|
||||
const isHttp = matchesScheme(uri, Schemas.http) || matchesScheme(uri, Schemas.https);
|
||||
|
||||
if (!isHttp) {
|
||||
checkProposedApiEnabled(extension); // https://github.com/microsoft/vscode/issues/124263
|
||||
}
|
||||
|
||||
try {
|
||||
return await extHostWindow.asExternalUri(uri, { allowTunneling: !!initData.remote.authority });
|
||||
} catch {
|
||||
return uri;
|
||||
} catch (err) {
|
||||
if (isHttp) {
|
||||
return uri;
|
||||
}
|
||||
|
||||
throw err;
|
||||
}
|
||||
},
|
||||
get remoteName() {
|
||||
|
||||
Reference in New Issue
Block a user