Change:
vscode with no folder (purple status bar) untitled file, save as file how the simple dialog offers me the root path. This is wrong imho, you should offer the home directory, or at least something wich I choose the last time
Could we keep the Untitled URI scheme here? All file scheme URIs are absolute. Which means that the remote file picker would have to use a heuristic like checking for "Untitled-" in the path to tell that the user home should be used.
Feel free to change. is the expert on the untitled URIs...
the URI only seems to be used in combination of the dialog itself (both native and custom - ), so I think we can preserve the if you deal with the untitled case in both worlds.

Discussion:
} private ensureFileSchema(schema: string): string[] { <del> return schema !== Schemas.file ? [schema, Schemas.file] : [schema]; </del> <ins> // Don't allow untitled schema through. return schema === Schemas.untitled ? [Schemas.file] : (schema !== Schemas.file ? [schema, Schemas.file] : [schema]); </ins> } async pickFileFolderAndOpen(options: IPickAndOpenOptions): Promise<any> {

} private toNativeSaveDialogOptions(options: ISaveDialogOptions): Electron.SaveDialogOptions { <ins> options.defaultUri = options.defaultUri ? URI.file(options.defaultUri.path) : undefined; </ins> return { defaultPath: options.defaultUri && options.defaultUri.fsPath, buttonLabel: options.saveLabel,

return remoteFileDialog.showSaveDialog(options); } <del> private getSchemeFilterForWindow() { </del> <ins> private getSchemeFilterForWindow(): string { </ins> return !this.environmentService.configuration.remoteAuthority ? Schemas.file : REMOTE_HOST_SCHEME; } private getFileSystemSchema(options: { availableFileSystems?: string[], defaultUri?: URI }): string { <del> return options.availableFileSystems && options.availableFileSystems[0] || options.defaultUri && options.defaultUri.scheme || this.getSchemeFilterForWindow(); </del> <ins> return options.availableFileSystems && options.availableFileSystems[0] || this.getSchemeFilterForWindow(); </ins> } }

import { IModelService } from 'vs/editor/common/services/modelService'; import { INotificationService, Severity } from 'vs/platform/notification/common/notification'; import { isEqualOrParent, isEqual, joinPath, dirname, extname, basename, toLocalResource } from 'vs/base/common/resources'; <del> import { posix } from 'vs/base/common/path'; </del> import { getConfirmMessage, IDialogService, IFileDialogService, ISaveDialogOptions, IConfirmation } from 'vs/platform/dialogs/common/dialogs'; import { IModeService } from 'vs/editor/common/services/modeService'; import { IEditorService } from 'vs/workbench/services/editor/common/editorService';

async confirmSave(resources?: URI[]): Promise<ConfirmResult> { if (this.environmentService.isExtensionDevelopment) { <del> return ConfirmResult.DONT_SAVE; // no veto when we are in extension dev mode because we cannot assum we run interactive (e.g. tests) </del> <ins> return ConfirmResult.DONT_SAVE; // no veto when we are in extension dev mode because we cannot assume we run interactive (e.g. tests) </ins> } const resourcesToConfirm = this.getDirty(resources);

return joinPath(lastActiveFolder, untitledFileName); } <del> return schemeFilter === Schemas.file ? URI.file(untitledFileName) : URI.from({ scheme: schemeFilter, authority: remoteAuthority, path: posix.sep + untitledFileName }); </del> <ins> return untitledResource.with({ path: untitledFileName }); </ins> } async revert(resource: URI, options?: IRevertOptions): Promise<boolean> {