365
366
private doGetUriTrustInfo(uri: URI): IWorkspaceTrustUriInfo {
368
>
if (!this.workspaceTrustEnablementService.isWorkspaceTrustEnabled()) {
369
return { trusted: true, uri };
370
}
372
>
// Agent sessions workspace file is always trusted
373
>
if (this.uriIdentityService.extUri.isEqual(uri, this.environmentService.agentSessionsWorkspace)) {
374
return { trusted: true, uri };
375
}
377
>
if (this.isTrustedVirtualResource(uri)) {
378
return { trusted: true, uri };
379
}
381
>
if (this.isTrustedByRemote(uri)) {
382
return { trusted: true, uri };
383
}
385
>
let resultState = false;
386
>
let maxLength = -1;
387
>
388
>
let resultUri = uri;
389
>
390
>
for (const trustInfo of this._trustStateInfo.uriTrustInfo) {
391
if (this.uriIdentityService.extUri.isEqualOrParent(uri, trustInfo.uri)) {
392
const fsPath = trustInfo.uri.fsPath;