1
0
mirror of https://github.com/gilbertchen/duplicacy synced 2025-12-06 00:03:38 +00:00

Fixed #65: don't show statistics when downloader.totalFileSize is 0

This commit is contained in:
Gilbert Chen
2017-06-07 21:16:27 -04:00
parent 53f8a51b12
commit fa8c99747e

View File

@@ -353,7 +353,7 @@ func (downloader *ChunkDownloader) Download(threadIndex int, task ChunkDownloadT
}
}
if downloader.showStatistics || IsTracing() {
if (downloader.showStatistics || IsTracing()) && downloader.totalFileSize > 0 {
atomic.AddInt64(&downloader.downloadedFileSize, int64(chunk.GetLength()))
downloadFileSize := atomic.LoadInt64(&downloader.downloadedFileSize)