This commit is contained in:
romgrk 2015-06-29 21:10:43 +00:00
commit ed1d8fce89
2 changed files with 6 additions and 3 deletions

View file

@ -1,6 +1,7 @@
path = require 'path' path = require 'path'
fs = require 'fs-plus'
CommandError = require './command-error' CommandError = require './command-error'
fs = require 'fs'
trySave = (func) -> trySave = (func) ->
deferred = Promise.defer() deferred = Promise.defer()
@ -36,8 +37,9 @@ saveAs = (filePath) ->
fs.writeFileSync(filePath, editor.getText()) fs.writeFileSync(filePath, editor.getText())
getFullPath = (filePath) -> getFullPath = (filePath) ->
filePath = fs.normalize filePath
return filePath if path.isAbsolute(filePath) return filePath if path.isAbsolute(filePath)
return path.join(atom.project.getPath(), filePath) return path.join(atom.project.getPaths()[0], filePath)
replaceGroups = (groups, replString) -> replaceGroups = (groups, replString) ->
arr = replString.split('') arr = replString.split('')

View file

@ -15,7 +15,8 @@
"underscore-plus": "1.x", "underscore-plus": "1.x",
"event-kit": "^0.7.2", "event-kit": "^0.7.2",
"space-pen": "^5.1.1", "space-pen": "^5.1.1",
"atom-space-pen-views": "^2.0.4" "atom-space-pen-views": "^2.0.4",
"fs-plus": "^2.2.8"
}, },
"consumedServices": { "consumedServices": {
"vim-mode": { "vim-mode": {