Skip to content

Commit

Permalink
main: fix --examples unable to scan the directory
Browse files Browse the repository at this point in the history
  • Loading branch information
jean-emmanuel committed Sep 28, 2016
1 parent a1d09e5 commit 1431525
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/main/callbacks.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
var vm = require('vm')
var vm = require('vm'),
path = require('path')

module.exports = function(settings,fs,ipc,osc,dialog) {

Expand All @@ -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})
}

Expand Down

0 comments on commit 1431525

Please sign in to comment.