diff --git a/src/text-buffer.coffee b/src/text-buffer.coffee index f34f657ae..552e44137 100644 --- a/src/text-buffer.coffee +++ b/src/text-buffer.coffee @@ -165,14 +165,14 @@ class TextBuffer extends TextBufferCore # Sets the path for the file. # - # path - A {String} representing the new file path - setPath: (path) -> - return if path == @getPath() + # filePath - A {String} representing the new file path + setPath: (filePath) -> + return if filePath == @getPath() @file?.off() - if path - @file = new File(path) + if filePath + @file = new File(filePath) @subscribeToFile() else @file = null @@ -188,12 +188,12 @@ class TextBuffer extends TextBufferCore # Saves the buffer at a specific path. # - # path - The path to save at. - saveAs: (path) -> - unless path then throw new Error("Can't save buffer with no file path") + # filePath - The path to save at. + saveAs: (filePath) -> + unless filePath then throw new Error("Can't save buffer with no file path") @emit 'will-be-saved', this - @setPath(path) + @setPath(filePath) @cachedDiskContents = @getText() @file.write(@getText()) @conflict = false