Compare commits
2 Commits
9835c5fc6b
...
release
| Author | SHA1 | Date | |
|---|---|---|---|
| 839c3d998e | |||
| af5ee0299d |
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "autonomy-studio-launcher",
|
||||
"version": "1.1.4",
|
||||
"version": "1.1.5",
|
||||
"description": "Autonomy Studio v2 Frontend",
|
||||
"main": "./out/main/index.js",
|
||||
"author": {
|
||||
|
||||
+6
-1
@@ -350,12 +350,17 @@ function downloadFile(
|
||||
|
||||
const total = Number(response.headers['content-length'] ?? 0)
|
||||
let received = 0
|
||||
let lastProgress = -1
|
||||
const file = createWriteStream(tmpPath)
|
||||
|
||||
response.on('data', (chunk: Buffer) => {
|
||||
received += chunk.length
|
||||
if (total > 0) {
|
||||
onProgress(Math.min(99, Math.round((received / total) * 100)))
|
||||
const progress = Math.min(99, Math.round((received / total) * 100))
|
||||
if (progress !== lastProgress) {
|
||||
lastProgress = progress
|
||||
onProgress(progress)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user