From 1431525273c92a4fddfbb779377f541dd37c8930 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Thu, 29 Sep 2016 00:11:16 +0200 Subject: [PATCH] main: fix --examples unable to scan the directory --- app/main/callbacks.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/main/callbacks.js b/app/main/callbacks.js index a0d6e558f..11e28dd2a 100644 --- a/app/main/callbacks.js +++ b/app/main/callbacks.js @@ -1,4 +1,5 @@ -var vm = require('vm') +var vm = require('vm'), + path = require('path') module.exports = function(settings,fs,ipc,osc,dialog) { @@ -10,7 +11,8 @@ module.exports = function(settings,fs,ipc,osc,dialog) { var recentSessions = settings.read('recentSessions') if (settings.read('examples')) { - recentSessions = fs.readdirSync('examples') + var dir = path.resolve(__dirname + '/../examples') + recentSessions = fs.readdirSync(dir) recentSessions = recentSessions.map(function(file){return 'examples/' + file}) }