mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-19 19:30:44 +00:00
Update download.go
This commit is contained in:
parent
a179ccf6f0
commit
d006bf86f8
1 changed files with 3 additions and 0 deletions
|
|
@ -274,6 +274,9 @@ func (w *downloadWriter) Write(buf []byte) (int, error) {
|
|||
|
||||
// Report progress.
|
||||
w.written += int64(n)
|
||||
if w.size <= 0 {
|
||||
return n, err
|
||||
}
|
||||
pct := w.written * 10 / w.size * 10
|
||||
if pct != w.lastpct {
|
||||
if w.lastpct != 0 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue