imports: fix io.Copy call for the message body

This commit is contained in:
Simon Ser 2020-06-11 11:04:57 +02:00
parent 346a0443db
commit 74c2b8fa37
No known key found for this signature in database
GPG Key ID: 0FDE7BE0E88F5E48
1 changed files with 1 additions and 1 deletions

View File

@ -98,7 +98,7 @@ func ImportMessage(c *protonmail.Client, r io.Reader) error {
}
defer ewc.Close()
if _, err := io.Copy(w, body); err != nil {
if _, err := io.Copy(ewc, body); err != nil {
return err
}
if err := ewc.Close(); err != nil {