diff options
author | Koni Marti <koni.marti@gmail.com> | 2022-09-21 00:27:58 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2022-09-25 11:54:23 +0200 |
commit | e5b0725824ac9ccf218732238e4b3b525fa6ad46 (patch) | |
tree | 54ae2d8ea02616c32a74a3d4fcfb3dce50d1c376 /worker/mbox | |
parent | 41822a6123d5b6779be436d738bf26747de87b0a (diff) | |
download | aerc-e5b0725824ac9ccf218732238e4b3b525fa6ad46.tar.gz |
charset: handle unknown charsets more user-friendly
Do not throw an error when the charset is unknown; the message entity
can still be read, but log the error instead.
Reported-by: falsifian
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'worker/mbox')
-rw-r--r-- | worker/mbox/worker.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/worker/mbox/worker.go b/worker/mbox/worker.go index 067147e0..c5c70821 100644 --- a/worker/mbox/worker.go +++ b/worker/mbox/worker.go @@ -15,7 +15,6 @@ import ( "git.sr.ht/~rjarry/aerc/worker/handlers" "git.sr.ht/~rjarry/aerc/worker/lib" "git.sr.ht/~rjarry/aerc/worker/types" - gomessage "github.com/emersion/go-message" ) func init() { @@ -179,7 +178,7 @@ func (w *mboxWorker) handleMessage(msg types.WorkerMessage) error { break } - fullMsg, err := gomessage.Read(contentReader) + fullMsg, err := lib.ReadMessage(contentReader) if err != nil { reterr = fmt.Errorf("could not read message: %w", err) break |