add Retcode

This commit is contained in:
Akbar Yahya 2022-11-12 13:43:53 +08:00
parent 00497f72de
commit 95bcedf14b
No known key found for this signature in database
GPG Key ID: 0C9985FEC5C018C9
1 changed files with 14 additions and 5 deletions

11
op.js
View File

@ -471,6 +471,7 @@ function clean_proto_gen() {
// all
files.forEach(function (file) {
var todoremove = false;
// main file
var found = json_gc_needed.find((j) => file.match(j.name));
if (found) {
@ -482,6 +483,15 @@ function clean_proto_gen() {
//console.log("Files sub are required: "+file);
} else {
found_needclean++;
if (file.match("Retcode")) {
console.log("found");
} else {
todoremove = true;
}
}
}
if (todoremove) {
try {
fs.unlinkSync(file);
//file removed
@ -489,7 +499,6 @@ function clean_proto_gen() {
console.error(err);
}
}
}
});
//console.log(file_toaddmore);