summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Kiessling <mittagessen@l.unchti.me>2012-01-23 01:09:38 +0100
committerBenjamin Kiessling <mittagessen@l.unchti.me>2012-01-23 01:09:38 +0100
commitda10ba8b0d2cbd67866824472442804ad4b4ffd2 (patch)
tree31cecbc5cd3470e90f846647c9c76d836c6b3b1b
parent4c09840a7e756ff4a36c6bbb5fc92a3d3036c5b3 (diff)
Ignore non-existence of {desc,events}.js
-rw-r--r--model_fs.js8
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) {