Don't overwrite the file-scoped path variable

This commit is contained in:
Nathan Sobo
2014-04-24 10:13:01 -06:00
parent 6c4e138ec0
commit ad8bd98c9a

View File

@@ -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()