307
// ...only ever for `file` resources
308
uri.scheme === Schemas.file &&
310
>
// ...and we run in native environments
311
>
platform.isNative ||
312
// ...or web worker extensions on desktop
313
(platform.webWorkerOrigin === `${Schemas.vscodeFileResource}://${FileAccessImpl.FALLBACK_AUTHORITY}`)
314
)
315
) {
317
>
scheme: Schemas.vscodeFileResource,
318
>
// We need to provide an authority here so that it can serve
319
>
// as origin for network and loading matters in chromium.
320
>
// If the URI is not coming with an authority already, we
321
>
// add our own
322
>
authority: uri.authority || FileAccessImpl.FALLBACK_AUTHORITY,
323
>
query: null,
324
>
fragment: null
325
>
});
326
>
}
327
328
return uri;