fix: if i > 0 add to bytesRead

This commit is contained in:
Derrick Hammer 2024-03-22 20:23:51 -04:00
parent 96713e3538
commit 0caa54f028
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 3 additions and 0 deletions

View File

@ -241,6 +241,9 @@ func (i *ImportReader) Read(p []byte) (n int, err error) {
}
func (i *ImportReader) ReadBytes(n int) (err error) {
if n > 0 {
i.bytesRead += uint64(n)
}
stageProgress := float64(100) / float64(i.totalStages)
// Calculate progress based on bytes read