mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-18 19:11:36 -04:00
Merge from vscode 31e03b8ffbb218a87e3941f2b63a249f061fe0e4 (#4986)
This commit is contained in:
@@ -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 });
|
||||
}
|
||||
Reference in New Issue
Block a user