Normalize nvatom.directory so that ~/... works correctly.

This commit is contained in:
lexicalunit
2015-09-24 18:36:59 -05:00
parent 4e4688fe78
commit 61d071c15a
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ class NotationalVelocityView extends SelectListView
@initializedAt = new Date()
super
@addClass('nvatom from-top overlay')
@rootDirectory = atom.config.get('nvatom.directory')
@rootDirectory = fs.normalize(atom.config.get('nvatom.directory'))
unless fs.existsSync(@rootDirectory)
throw new Error("The given directory #{@rootDirectory} does not exist. "
+ "Set the note directory to the existing one from Settings.")
+1 -1
View File
@@ -85,7 +85,7 @@ module.exports =
@autosave(paneItem) for paneItem in atom.workspace.getPaneItems()
ensureNoteDirectory: ->
noteDirectory = atom.config.get('nvatom.directory')
noteDirectory = fs.normalize(atom.config.get('nvatom.directory'))
packagesDirectory = path.join(process.env.ATOM_HOME, 'packages')
defaultNoteDirectory = path.join(packagesDirectory, 'nvatom', 'notebook')