Add remaining scanning time (fixes #2484)

This commit is contained in:
Jakob Borg
2015-11-18 10:57:11 +01:00
parent c5cb5cba18
commit ba9448bdd7
5 changed files with 72 additions and 9 deletions

View File

@@ -146,9 +146,6 @@ func (w *Walker) Walk() (chan protocol.FileInfo, error) {
var filesToHash []protocol.FileInfo
var total int64 = 1
progress := newByteCounter()
defer progress.Close()
for file := range toHashChan {
filesToHash = append(filesToHash, file)
total += int64(file.CachedSize)
@@ -156,6 +153,9 @@ func (w *Walker) Walk() (chan protocol.FileInfo, error) {
realToHashChan := make(chan protocol.FileInfo)
done := make(chan struct{})
progress := newByteCounter()
defer progress.Close()
newParallelHasher(w.Dir, w.BlockSize, w.Hashers, finishedChan, realToHashChan, progress, done, w.Cancel)
// A routine which actually emits the FolderScanProgress events