diff --git a/src/vs/workbench/services/dialogs/browser/simpleFileDialog.ts b/src/vs/workbench/services/dialogs/browser/simpleFileDialog.ts index 67885964d87cbb079bb3817425af6585c3e1db79..198769532541dec01e69aa3c8a3c7b0b2fcaab17 100644 --- a/src/vs/workbench/services/dialogs/browser/simpleFileDialog.ts +++ b/src/vs/workbench/services/dialogs/browser/simpleFileDialog.ts @@ -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 {