Commit b1226def by 朱哲铨

bug 修复

parent 84cfda63
...@@ -20,13 +20,14 @@ function zip(from, to) { ...@@ -20,13 +20,14 @@ function zip(from, to) {
console.log("success"); console.log("success");
let data = fs.readdirSync(dirName); let data = fs.readdirSync(dirName);
for (let i = 0; i < data.length; i++) { for (let i = 0; i < data.length; i++) {
let fileName = uuid.v4() + ".png";
let el = data[i]; let el = data[i];
let file_path = path.join(dirName, el); let file_path = path.join(dirName, el);
console.log(file_path, to); console.log(file_path, to);
fs.renameSync(file_path, path.join(to, el)); fs.renameSync(file_path, path.join(to, fileName));
arr.push({ arr.push({
fileName: el, fileName: fileName,
productionFile: path.join(to, el) productionFile: path.join(to, fileName)
}); });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment