From 61a909b06ec3f6bb98dae1e8865e00d50ceac108 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Thu, 11 Aug 2016 09:23:43 +0200 Subject: [PATCH] Remove config option `editor.backUpBeforeSaving` After shipping #11828 Atom always creates a backup file in the `~/.atom/recovery` directory, trying to restore it automatically via the main process in case there is a hard crash on the renderer process. This approach should be resilient enough to allow us to delete this config option altogether. We can still keep it for a while in text-buffer, in case we need to use it again at some point, but it's probably fine to remove it from there too at some point in the future. --- src/config-schema.coffee | 4 ---- src/text-editor.coffee | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/config-schema.coffee b/src/config-schema.coffee index 3793f7c59..4e6bc34f4 100644 --- a/src/config-schema.coffee +++ b/src/config-schema.coffee @@ -237,10 +237,6 @@ module.exports = default: true title: 'Confirm Checkout HEAD Revision' description: 'Show confirmation dialog when checking out the HEAD revision and discarding changes to current file since last commit.' - backUpBeforeSaving: - type: 'boolean' - default: false - description: 'Ensure file contents aren\'t lost if there is an I/O error during save by making a temporary backup copy.' invisibles: type: 'object' description: 'A hash of characters Atom will use to render whitespace characters. Keys are whitespace character types, values are rendered characters (use value false to turn off individual whitespace character types).' diff --git a/src/text-editor.coffee b/src/text-editor.coffee index c7b7dd4b7..8f4d721aa 100644 --- a/src/text-editor.coffee +++ b/src/text-editor.coffee @@ -757,14 +757,14 @@ class TextEditor extends Model # Essential: Saves the editor's text buffer. # # See {TextBuffer::save} for more details. - save: -> @buffer.save(backup: @config.get('editor.backUpBeforeSaving')) + save: -> @buffer.save() # Essential: Saves the editor's text buffer as the given path. # # See {TextBuffer::saveAs} for more details. # # * `filePath` A {String} path. - saveAs: (filePath) -> @buffer.saveAs(filePath, backup: @config.get('editor.backUpBeforeSaving')) + saveAs: (filePath) -> @buffer.saveAs(filePath) # Determine whether the user should be prompted to save before closing # this editor.