Skip to content

Commit

Permalink
little less byte downloading
Browse files Browse the repository at this point in the history
  • Loading branch information
refik committed Jun 20, 2014
1 parent e1f2556 commit c266d42
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,11 @@ func DownloadFile(file File, path string, runWg *sync.WaitGroup, reportCh chan R
if err == nil {
// This range in not finished yet
zByteIndex := zIndex * ChunkSize
rangeCustomSize -= zByteIndex - rangeCustomOffset
rangeCustomOffset = zByteIndex
if zByteIndex > rangeCustomOffset {
rangeCustomSize -= zByteIndex - rangeCustomOffset
rangeCustomOffset = zByteIndex
}

} else {
continue
}
Expand Down

0 comments on commit c266d42

Please sign in to comment.