Commit 59f39552 authored by Amy Yan's avatar Amy Yan

fixed staying bar staying at full

parent 3067f4e8
......@@ -168,7 +168,12 @@ function download(url, fileName, cb) {
response.on("data", function(chunk) {
partiallength += chunk.length
win.setProgressBar(partiallength / totallength)
if (partiallength / totallength != 1) {
win.setProgressBar(partiallength / totallength)
}
else {
win.setProgressBar(0)
}
ipcMain.emit("downloadProgress", partiallength / totallength)
});
......
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