diff options
author | Jeffas <dev@jeffas.io> | 2020-02-26 20:02:58 +0000 |
---|---|---|
committer | Reto Brunner <reto@labrat.space> | 2020-02-26 21:46:35 +0100 |
commit | d6696f34b83044d4b9e7e714e75b8ff02d54cbc0 (patch) | |
tree | 989ea2af3b3af3a79fb914439359a49dace93b36 /worker/maildir/search.go | |
parent | 00ed2ef06a9bfb35d05c33948cbd93c03153636a (diff) | |
download | aerc-d6696f34b83044d4b9e7e714e75b8ff02d54cbc0.tar.gz |
Make search more lenient
When we fail to read a single message we don't need to fail the whole search, just log the error and we can still get results back.
Diffstat (limited to 'worker/maildir/search.go')
-rw-r--r-- | worker/maildir/search.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/worker/maildir/search.go b/worker/maildir/search.go index 47eab6a..f658c02 100644 --- a/worker/maildir/search.go +++ b/worker/maildir/search.go @@ -80,7 +80,8 @@ func (w *Worker) search(criteria *searchCriteria) ([]uint32, error) { for _, key := range keys { success, err := w.searchKey(key, criteria, requiredParts) if err != nil { - return nil, err + // don't return early so that we can still get some results + w.worker.Logger.Printf("Failed to search key %v: %v", key, err) } else if success { matchedUids = append(matchedUids, key) } |