Fix rename
Signed-off-by: James Ketrenos <james_git@ketrenos.com>
This commit is contained in:
parent
570b1bc2fb
commit
fb4b1e42d5
@ -238,13 +238,14 @@ function convertNefToJpg(path, file) {
|
|||||||
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: " + code);
|
||||||
}
|
}
|
||||||
fs.rename(path + "/" + file, path + "/raw/" + path, function(err) {
|
return mkdirPromise(path + "/raw").then(function() {
|
||||||
if (err) {
|
fs.rename(path + "/" + file, path + "/raw/" + file, function(err) {
|
||||||
console.error("Unable to move RAW file: " + path + "/" + file);
|
if (err) {
|
||||||
return reject(err);
|
console.error("Unable to move RAW file: " + path + "/" + file);
|
||||||
} else {
|
return reject(err);
|
||||||
|
}
|
||||||
return resolve();
|
return resolve();
|
||||||
}
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user