fix getFullPath(): support ~ as reference to home dir

This commit is contained in:
Rom Grk 2015-05-27 22:06:23 -04:00
parent e33dc15392
commit 86101ef8ac
2 changed files with 5 additions and 2 deletions

View file

@ -1,4 +1,5 @@
path = require 'path'
fs = require 'fs-plus'
CommandError = require './command-error'
trySave = (func) ->
@ -31,6 +32,7 @@ trySave = (func) ->
deferred.promise
getFullPath = (filePath) ->
filePath = fs.normalize(filePath)
return filePath if path.isAbsolute(filePath)
return path.join(atom.project.getPath(), filePath)

View file

@ -12,10 +12,11 @@
"atom": ">=0.200.0 <2.0.0"
},
"dependencies": {
"underscore-plus": "1.x",
"atom-space-pen-views": "^2.0.4",
"event-kit": "^0.7.2",
"fs-plus": "^2.8.1",
"space-pen": "^5.1.1",
"atom-space-pen-views": "^2.0.4"
"underscore-plus": "1.x"
},
"consumedServices": {
"vim-mode": {