diff --git a/server/scanner.js b/server/scanner.js index 8516fe4..099c02d 100644 --- a/server/scanner.js +++ b/server/scanner.js @@ -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);