From c30697cb0771882a6077b40e4d6f62105fafbf0b Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Tue, 19 Mar 2013 18:40:39 +0100 Subject: [PATCH] Don't break the whole server if an import failed because no files were uploaded Fixes #1611 --- src/node/handler/ImportHandler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node/handler/ImportHandler.js b/src/node/handler/ImportHandler.js index ac856a604..7bb9c5db9 100644 --- a/src/node/handler/ImportHandler.js +++ b/src/node/handler/ImportHandler.js @@ -60,7 +60,7 @@ exports.doImport = function(req, res, padId) form.parse(req, function(err, fields, files) { //the upload failed, stop at this point if(err || files.file === undefined) { - console.warn("Uploading Error: " + err.stack); + if(err) console.warn("Uploading Error: " + err.stack); callback("uploadFailed"); } //everything ok, continue