Fix default uri when scheme is file
This commit is contained in:
parent
c052919d98
commit
12166440e1
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue