Added RAW move command
Signed-off-by: James Ketrenos <james_git@ketrenos.com>
This commit is contained in:
parent
1c2b7a42aa
commit
723cf4c99a
@ -184,9 +184,9 @@ function existsPromise(path) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function convertNefToJpg(path, file) {
|
function convertNefToJpg(path, file) {
|
||||||
|
path = picturesPath + path;
|
||||||
console.log("Converting " + path + "/" + file);
|
console.log("Converting " + path + "/" + file);
|
||||||
|
|
||||||
path = picturesPath + path;
|
|
||||||
return new Promise(function(resolve, reject) {
|
return new Promise(function(resolve, reject) {
|
||||||
fs.stat(path + "/" + file.replace(/\.nef$/i, ".jpg"), function(err, stats) {
|
fs.stat(path + "/" + file.replace(/\.nef$/i, ".jpg"), function(err, stats) {
|
||||||
if (!err) {
|
if (!err) {
|
||||||
@ -208,10 +208,8 @@ function convertNefToJpg(path, file) {
|
|||||||
|
|
||||||
ufraw.on('close', function(code) {
|
ufraw.on('close', function(code) {
|
||||||
if (code != 0) {
|
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) {
|
fs.rename(path + "/" + file, path + "/raw/" + path, function(err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.error("Unable to move RAW file: " + path + "/" + file);
|
console.error("Unable to move RAW file: " + path + "/" + file);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user