Count errors separately and not as files that are "done"

This commit is contained in:
Florian Weingarten
2015-04-26 01:54:35 +00:00
parent 87a1946417
commit 61b1a5b1de
3 changed files with 15 additions and 12 deletions

View File

@@ -403,7 +403,7 @@ func (arch *Archiver) fileWorker(wg *sync.WaitGroup, p *Progress, done <-chan st
fmt.Fprintf(os.Stderr, "error for %v: %v\n", e.Path(), e.Error())
// ignore this file
e.Result() <- nil
p.Report(Stat{Files: 1})
p.Report(Stat{Errors: 1})
continue
}
@@ -412,7 +412,7 @@ func (arch *Archiver) fileWorker(wg *sync.WaitGroup, p *Progress, done <-chan st
// TODO: integrate error reporting
debug.Log("Archiver.fileWorker", "NodeFromFileInfo returned error for %v: %v", node.path, err)
e.Result() <- nil
p.Report(Stat{Files: 1})
p.Report(Stat{Errors: 1})
continue
}
@@ -449,7 +449,7 @@ func (arch *Archiver) fileWorker(wg *sync.WaitGroup, p *Progress, done <-chan st
fmt.Fprintf(os.Stderr, "error for %v: %v\n", node.path, err)
// ignore this file
e.Result() <- nil
p.Report(Stat{Files: 1})
p.Report(Stat{Errors: 1})
continue
}
} else {