Merge from vscode 31e03b8ffbb218a87e3941f2b63a249f061fe0e4 (#4986)

This commit is contained in:
Anthony Dresser
2019-04-10 16:29:23 -07:00
committed by GitHub
parent 18c54f41bd
commit 8315dacda4
320 changed files with 5540 additions and 3822 deletions

View File

@@ -284,7 +284,6 @@ export namespace DataUri {
}
}
export class ResourceGlobMatcher {
private readonly globalExpression: ParsedExpression;
@@ -311,3 +310,16 @@ export class ResourceGlobMatcher {
return !!this.globalExpression(resource.path);
}
}
export function toLocalResource(resource: URI, authority: string | undefined): URI {
if (authority) {
let path = resource.path;
if (path && path[0] !== paths.posix.sep) {
path = paths.posix.sep + path;
}
return resource.with({ scheme: Schemas.vscodeRemote, authority, path });
}
return resource.with({ scheme: Schemas.file });
}