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:36:38 -07:00
parent 046275b543
commit 430c5e7ae9

View File

@ -241,7 +241,8 @@ function convertNefToJpg(path, file) {
ufraw.on('exit', function(code, signal) {
if (signal || code != 0) {
return reject("UFRAW for " + path + "/" + file + " returned an error: " + code + "\n" + signal + "\n" + error + "\n");
console.error("UFRAW for " + path + "/" + file + " returned an error: " + code + "\n" + signal + "\n" + error + "\n");
return moveCorrupt(path, file);
}
return mkdirPromise(path + "/raw").then(function() {
fs.rename(path + "/" + file, path + "/raw/" + file, function(err) {
@ -410,6 +411,8 @@ function triggerWatcher() {
processQueue.push([ path, file, created, albumId ]);
});
});
}).catch(function() {
console.warn("Continuing file processing.");
});
}, {
concurrency: 1