2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-22 21:05:10 +00:00

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

View File

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