提交 12166440 编写于 作者: A Alex Ross

Fix default uri when scheme is file

上级 c052919d
......@@ -110,10 +110,13 @@ export class RemoteFileDialog {
let defaultUri = options.defaultUri;
const filename = (defaultUri && isSave && (resources.dirname(defaultUri).path === '/')) ? resources.basename(defaultUri) : undefined;
if (!defaultUri || filename) {
const env = await this.remoteAgentService.getEnvironment();
if (env) {
defaultUri = env.userHome;
} else {
if (this.scheme !== Schemas.file) {
const env = await this.remoteAgentService.getEnvironment();
if (env) {
defaultUri = env.userHome;
}
}
if (!defaultUri) {
defaultUri = URI.from({ scheme: this.scheme, path: this.environmentService.userHome });
}
if (filename) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册