Skip to content

Commit

Permalink
imports: check protonmail.ImportResult.Err
Browse files Browse the repository at this point in the history
  • Loading branch information
emersion committed Nov 14, 2019
1 parent db983ee commit 1edc88f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion imports/messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ func ImportMessage(c *protonmail.Client, r io.Reader) error {
return err
}

if _, err := importer.Commit(); err != nil {
if result, err := importer.Commit(); err != nil {
return err
} else if err := result.Err(); err != nil {
return err
}

Expand Down

0 comments on commit 1edc88f

Please sign in to comment.