fix getFullPath(): support ~ as reference to home dir
This commit is contained in:
parent
e33dc15392
commit
86101ef8ac
2 changed files with 5 additions and 2 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue