diff options
-rw-r--r-- | model_fs.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/model_fs.js b/model_fs.js index a4d2bef..fb3d015 100644 --- a/model_fs.js +++ b/model_fs.js @@ -36,7 +36,7 @@ exports.rebuildFiles = function() { next(); }).on("file", function(root, fileStats, next) { if(fileStats.name == configuration.description || fileStats.name == configuration.events) { - next(); + next(); } else if(fileStats.name == configuration.template) { var lastDir = root.split('/'); @@ -66,7 +66,7 @@ exports.rebuildFiles = function() { /* collects descriptions and adds them to the slideset */ var collectDescs = function(slideset) { fs.readFile(path.join(__dirname, configuration.dir, slideset, configuration.description), function(err, data) { - if(err) { throw err; } + if(err) { setSlides(slideset, newSlides[slideset], function(err) { if(err) { throw err}}); return; } var descs = JSON.parse(data.toString()); for(var file in newSlides[slideset]['slides']) { if(!newSlides[slideset]['slides'].hasOwnProperty(file)) { continue; } @@ -86,11 +86,11 @@ exports.rebuildFiles = function() { /* collect events and adds them to the slideset */ var collectEvents = function(slideset) { fs.readFile(path.join(__dirname, configuration.dir, slideset, configuration.events), function(err, data) { - if(err) { throw err; } + if(err) { return; } try { var events = JSON.parse(data.toString()); } catch(e) { - throw err; + return; } if(events['type'] == 'text') { setEvents(slideset, events['events'], function(err) { |