Skip to content

Commit

Permalink
MACOS version
Browse files Browse the repository at this point in the history
  • Loading branch information
Naibo Wang authored and Naibo Wang committed Mar 28, 2023
1 parent 4669caf commit 414ad5e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Binary file modified .DS_Store
Binary file not shown.
5 changes: 3 additions & 2 deletions ElectronJS/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,9 @@ exports.start = function(port = 8074) {
file_names = [];
fs.readdirSync(path.join(getDir(), "tasks")).forEach((file)=>{
try{
file_names.push(parseInt(file.split(".")[0]));
if(file.split(".")[1] == "json"){
file_names.push(parseInt(file.split(".")[0]));
}
} catch (error) {

}
Expand Down Expand Up @@ -240,7 +242,6 @@ exports.start = function(port = 8074) {
if (file_names.length != 0) {
eid = Math.max(...file_names) + 1;
}
console.log(file_names);
task["id"] = eid;
task = JSON.stringify(task);
fs.writeFile(path.join(getDir(), `execution_instances/${eid}.json`), task, (err) => {});
Expand Down

0 comments on commit 414ad5e

Please sign in to comment.