Added error output on ufraw

Signed-off-by: James Ketrenos <james_git@ketrenos.com>
This commit is contained in:
James Ketr 2018-08-29 14:27:15 -07:00
parent fda62d576b
commit 046275b543

View File

@ -239,9 +239,9 @@ function convertNefToJpg(path, file) {
error += data; error += data;
}); });
ufraw.on('close', function(code) { ufraw.on('exit', function(code, signal) {
if (code != 0) { if (signal || code != 0) {
return reject("UFRAW for " + path + "/" + file + " returned an error: ", error); return reject("UFRAW for " + path + "/" + file + " returned an error: " + code + "\n" + signal + "\n" + error + "\n");
} }
return mkdirPromise(path + "/raw").then(function() { return mkdirPromise(path + "/raw").then(function() {
fs.rename(path + "/" + file, path + "/raw/" + file, function(err) { fs.rename(path + "/" + file, path + "/raw/" + file, function(err) {