Added RAW move command

Signed-off-by: James Ketrenos <james_git@ketrenos.com>
This commit is contained in:
James Ketr 2018-08-28 10:56:03 -07:00
parent 1c2b7a42aa
commit 723cf4c99a

View File

@ -184,9 +184,9 @@ function existsPromise(path) {
}
function convertNefToJpg(path, file) {
path = picturesPath + path;
console.log("Converting " + path + "/" + file);
path = picturesPath + path;
return new Promise(function(resolve, reject) {
fs.stat(path + "/" + file.replace(/\.nef$/i, ".jpg"), function(err, stats) {
if (!err) {
@ -208,10 +208,8 @@ function convertNefToJpg(path, file) {
ufraw.on('close', function(code) {
if (code != 0) {
return reject("UFRAW returned an error");
return reject("UFRAW for " + path + "/" + file + " returned an error: " + code);
}
console.log("UFRAW for " + path + "/" + file + ": " + code);
return resolve();
fs.rename(path + "/" + file, path + "/raw/" + path, function(err) {
if (err) {
console.error("Unable to move RAW file: " + path + "/" + file);