fixes issue with asExternalUri API

This commit is contained in:
João Moreno
2021-06-04 10:38:59 +02:00
parent 8163cfd8c5
commit f99e1c358f

View File

@@ -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() {