Added two path.resolve

This commit is contained in:
Alexander Cerutti
2018-06-10 20:35:21 +02:00
parent 3d0a25314a
commit 5c8334e40a

View File

@@ -304,11 +304,11 @@ function generatePass(options) {
} }
// adding the files to the zip - i'm not using .directory method because it adds also hidden files like .DS_Store on macOS // adding the files to the zip - i'm not using .directory method because it adds also hidden files like .DS_Store on macOS
archive.file(`${Configuration.passModelsDir}/${options.modelName}.pass/${file}`, { name: file }); archive.file(path.resolve(Configuration.passModelsDir, `${options.modelName}.pass`, file), { name: file });
let hashFlow = forge.md.sha1.create(); let hashFlow = forge.md.sha1.create();
fs.createReadStream(`${Configuration.passModelsDir}/${options.modelName}.pass/${file}`) fs.createReadStream(path.resolve(Configuration.passModelsDir, `${options.modelName}.pass`, file))
.on("data", function(data) { .on("data", function(data) {
hashFlow.update(data.toString("binary")); hashFlow.update(data.toString("binary"));
}) })