archiver: Add error reporting for directories

When an error occurred while walking a directory, this error wasn't
reported to the user before.
This commit is contained in:
Alexander Neumann 2016-02-07 22:18:00 +01:00
parent 57a24b2cdf
commit 6a5b022939
1 changed files with 1 additions and 0 deletions

View File

@ -350,6 +350,7 @@ func (arch *Archiver) dirWorker(wg *sync.WaitGroup, p *Progress, done <-chan str
// ignore dir nodes with errors
if dir.Error() != nil {
fmt.Fprintf(os.Stderr, "error walking dir %v: %v\n", dir.Path(), dir.Error())
dir.Result() <- nil
p.Report(Stat{Errors: 1})
continue