提交 8145e9f3 编写于 作者: A Alex Ross

Fix local scheme for registered file systems in file picker

Part of #https://github.com/microsoft/vscode/issues/109345
上级 a0ce4341
......@@ -212,7 +212,12 @@ export class SimpleFileDialog {
path = path.replace(/\\/g, '/');
}
const uri: URI = this.scheme === Schemas.file ? URI.file(path) : URI.from({ scheme: this.scheme, path });
return resources.toLocalResource(uri, uri.scheme === Schemas.file ? undefined : this.remoteAuthority, this.pathService.defaultUriScheme);
return resources.toLocalResource(uri,
// If the default scheme is file, then we don't care about the remote authority
uri.scheme === Schemas.file ? undefined : this.remoteAuthority,
// If there is a remote authority, then we should use the system's default URI as the local scheme.
// If there is *no* remote authority, then we should use the default scheme for this dialog as that is already local.
this.remoteAuthority ? this.pathService.defaultUriScheme : uri.scheme);
}
private getScheme(available: readonly string[] | undefined, defaultUri: URI | undefined): string {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册