Unsilent errors reading mbox files

This commit is contained in:
Michal Horejsek
2020-09-16 15:51:08 +02:00
parent d6464c0048
commit c5665d0dd7
2 changed files with 5 additions and 1 deletions

View File

@ -99,7 +99,10 @@ func (p *MBOXProvider) updateCount(rule *Rule, progress *Progress, filePath stri
count := 0
for {
_, err := mboxReader.NextMessage()
if err != nil {
if err == io.EOF {
break
} else if err != nil {
progress.fatal(err)
break
}
count++