File reading bugs fixed
This commit is contained in:
parent
b54bbd9994
commit
e92c273d26
@ -11,6 +11,7 @@ function update(){
|
|||||||
fs.readFile("C:\\Users\\sigon\\Documents\\memory",
|
fs.readFile("C:\\Users\\sigon\\Documents\\memory",
|
||||||
(err,data)=>{
|
(err,data)=>{
|
||||||
var fileContents = data.toString().split("\n");
|
var fileContents = data.toString().split("\n");
|
||||||
|
if (fileContents.length>=387){
|
||||||
for (i=0;i<fileContents.length;i++){
|
for (i=0;i<fileContents.length;i++){
|
||||||
line=fileContents[i]
|
line=fileContents[i]
|
||||||
item=line.split(" ")
|
item=line.split(" ")
|
||||||
@ -35,6 +36,7 @@ function update(){
|
|||||||
axios.post("http://projectdivar.com/inventoryData",finalData)
|
axios.post("http://projectdivar.com/inventoryData",finalData)
|
||||||
}
|
}
|
||||||
firstLoad=false
|
firstLoad=false
|
||||||
|
}
|
||||||
setTimeout(update,1000)
|
setTimeout(update,1000)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user