diff --git a/package.json b/package.json index 796a603ef81..fdd73c3a5e2 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "Code", "version": "0.10.3", - "electronVersion": "0.34.1", + "electronVersion": "0.34.5", "author": { "name": "Microsoft Corporation" }, diff --git a/scripts/code.bat b/scripts/code.bat index 16ef475d615..9f8ce705cdb 100644 --- a/scripts/code.bat +++ b/scripts/code.bat @@ -15,6 +15,7 @@ if not exist out node .\node_modules\gulp\bin\gulp.js compile :: Configuration set NODE_ENV=development set VSCODE_DEV=1 +set ELECTRON_DEFAULT_ERROR_MODE=1 set ELECTRON_ENABLE_LOGGING=1 set ELECTRON_ENABLE_STACK_DUMPING=1 diff --git a/src/vs/workbench/browser/parts/editor/untitledEditorInput.ts b/src/vs/workbench/browser/parts/editor/untitledEditorInput.ts index 5b48fcb56b1..f261afcadcb 100644 --- a/src/vs/workbench/browser/parts/editor/untitledEditorInput.ts +++ b/src/vs/workbench/browser/parts/editor/untitledEditorInput.ts @@ -77,7 +77,7 @@ export class UntitledEditorInput extends EditorInput implements IResourceEditorI public suggestFileName(): string { if (!this.hasAssociatedFilePath) { let mime = this.getMime(); - if (mime) { + if (mime && mime !== MIME_TEXT /* do not suggest when the mime type is simple plain text */) { return suggestFilename(mime, this.getName()); } } diff --git a/src/vs/workbench/parts/files/electron-browser/textFileServices.ts b/src/vs/workbench/parts/files/electron-browser/textFileServices.ts index 3ef9539b29a..c4cc9cfae46 100644 --- a/src/vs/workbench/parts/files/electron-browser/textFileServices.ts +++ b/src/vs/workbench/parts/files/electron-browser/textFileServices.ts @@ -348,22 +348,13 @@ export class TextFileService extends BrowserTextFileService { private promptForPathAsync(defaultPath?: string): TPromise { return new TPromise((c, e) => { Dialog.showSaveDialog(remote.getCurrentWindow(), this.getSaveDialogOptions(defaultPath ? paths.normalize(defaultPath, true) : void 0), (path) => { - if (path && isWindows) { - path = strings.rtrim(path, '.*'); // Bug on Windows: When "All Files" is picked, the path gets an extra ".*" - } - c(path); }); }); } private promptForPathSync(defaultPath?: string): string { - let path = Dialog.showSaveDialog(remote.getCurrentWindow(), this.getSaveDialogOptions(defaultPath ? paths.normalize(defaultPath, true) : void 0)); - if (path && isWindows) { - path = strings.rtrim(path, '.*'); // Bug on Windows: When "All Files" is picked, the path gets an extra ".*" - } - - return path; + return Dialog.showSaveDialog(remote.getCurrentWindow(), this.getSaveDialogOptions(defaultPath ? paths.normalize(defaultPath, true) : void 0)); } private getSaveDialogOptions(defaultPath?: string): remote.ISaveDialogOptions { @@ -371,8 +362,13 @@ export class TextFileService extends BrowserTextFileService { defaultPath: defaultPath }; - // Filters are only working well on Windows it seems - if (!isWindows) { + // Filters are working flaky in Electron and there are bugs. On Windows they are working + // somewhat but we see issues: + // - https://github.com/atom/electron/issues/3556 + // - https://github.com/Microsoft/vscode/issues/451 + // - Bug on Windows: When "All Files" is picked, the path gets an extra ".*" + // Until these issues are resolved, we disable the dialog file extension filtering. + if (true) { return options; }