From 61d071c15a51578448fa38d6d88e225f27f5ff5a Mon Sep 17 00:00:00 2001 From: lexicalunit Date: Thu, 24 Sep 2015 18:36:59 -0500 Subject: [PATCH] Normalize nvatom.directory so that ~/... works correctly. --- lib/notational-velocity-view.coffee | 2 +- lib/notational-velocity.coffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/notational-velocity-view.coffee b/lib/notational-velocity-view.coffee index 5b53aaf..1279c89 100644 --- a/lib/notational-velocity-view.coffee +++ b/lib/notational-velocity-view.coffee @@ -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.") diff --git a/lib/notational-velocity.coffee b/lib/notational-velocity.coffee index e145c7c..d89ff65 100644 --- a/lib/notational-velocity.coffee +++ b/lib/notational-velocity.coffee @@ -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')