Move corrupt NEFs and continue processing

Signed-off-by: James Ketrenos <james_git@ketrenos.com>
This commit is contained in:
James Ketr 2018-08-29 14:49:04 -07:00
parent 430c5e7ae9
commit a168001830

View File

@ -241,8 +241,11 @@ function convertNefToJpg(path, file) {
ufraw.on('exit', function(code, signal) { ufraw.on('exit', function(code, signal) {
if (signal || code != 0) { if (signal || code != 0) {
console.error("UFRAW for " + path + "/" + file + " returned an error: " + code + "\n" + signal + "\n" + error + "\n"); let error = "UFRAW for " + path + "/" + file + " returned an error: " + code + "\n" + signal + "\n" + error + "\n";
return moveCorrupt(path, file); console.error(error);
return moveCorrupt(path, file).then(function() {
return reject(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) {