From ad8bd98c9ae5fcb86355b7a8b661e326f11e6ea6 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Thu, 24 Apr 2014 10:13:01 -0600 Subject: [PATCH] Don't overwrite the file-scoped path variable --- src/editor.coffee | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/editor.coffee b/src/editor.coffee index 50cb3e2c6..d0cd623d6 100644 --- a/src/editor.coffee +++ b/src/editor.coffee @@ -410,13 +410,13 @@ class Editor extends Model saveAs: (filePath) -> @buffer.saveAs(filePath) checkoutHead: -> - if path = @getPath() - atom.project.getRepo()?.checkoutHead(path) + if filePath = @getPath() + atom.project.getRepo()?.checkoutHead(filePath) # Copies the current file path to the native clipboard. copyPathToClipboard: -> - path = @getPath() - atom.clipboard.write(path) if path? + if filePath = @getPath() + atom.clipboard.write(filePath) # Public: Returns the {String} path of this editor's text buffer. getPath: -> @buffer.getPath()