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:22:57 -07:00
parent e3d75c82c9
commit fda62d576b

View File

@ -234,9 +234,14 @@ function convertNefToJpg(path, file) {
path + "/" + file path + "/" + file
]); ]);
let error = "";
ufraw.stderr.on('data', function(data) {
error += data;
});
ufraw.on('close', function(code) { ufraw.on('close', function(code) {
if (code != 0) { if (code != 0) {
return reject("UFRAW for " + path + "/" + file + " returned an error: " + code); return reject("UFRAW for " + path + "/" + file + " returned an error: ", error);
} }
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) {