From 29343aec3aa5bcf39be907ffe2c6eeeeb14c08cb Mon Sep 17 00:00:00 2001 From: Audrius Butkevicius Date: Mon, 12 Oct 2015 18:57:15 +0100 Subject: [PATCH] Fix division by zero (fixes #2373) --- lib/scanner/walk.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/scanner/walk.go b/lib/scanner/walk.go index c9e981e09..b827ed9fa 100644 --- a/lib/scanner/walk.go +++ b/lib/scanner/walk.go @@ -141,7 +141,7 @@ func (w *Walker) Walk() (chan protocol.FileInfo, error) { // which it receives the files we ask it to hash. go func() { var filesToHash []protocol.FileInfo - var total, progress int64 + var total, progress int64 = 1, 0 for file := range toHashChan { filesToHash = append(filesToHash, file) total += int64(file.CachedSize)