aboutsummaryrefslogtreecommitdiffstats
path: root/worker
diff options
context:
space:
mode:
authorJose Lombera <jose@lombera.dev>2022-08-31 21:21:01 -0500
committerRobin Jarry <robin@jarry.cc>2022-09-01 10:05:35 +0200
commit8ada3260ab8c3e9b4981c4bdc2de01aff2fae88c (patch)
treee36aa06f59db06e5df83f3021c10544c1b6e3063 /worker
parentdcd397f776d938a772b9c904d55b7808ec7a80f9 (diff)
downloadaerc-8ada3260ab8c3e9b4981c4bdc2de01aff2fae88c.tar.gz
notmuch: fix regression in error handling
Fix reggression introduced by 70bfcfef4257 ("lint: work nicely with wrapped errors (errorlint)"). Discovered this because it broke my arec-notmuch config where I have `exclude-tags=deleted`. Queries with `tag:deleted` would now fail with error message saying "Argument was ignored". Fixes: 70bfcfef4257 ("lint: work nicely with wrapped errors (errorlint)") Signed-off-by: Jose Lombera <jose@lombera.dev> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'worker')
-rw-r--r--worker/notmuch/lib/database.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/worker/notmuch/lib/database.go b/worker/notmuch/lib/database.go
index 007a0a7e..1add2770 100644
--- a/worker/notmuch/lib/database.go
+++ b/worker/notmuch/lib/database.go
@@ -113,7 +113,7 @@ func (db *DB) newQuery(ndb *notmuch.DB, query string) (*notmuch.Query, error) {
q.SetSortScheme(notmuch.SORT_OLDEST_FIRST)
for _, t := range db.excludedTags {
err := q.AddTagExclude(t)
- if errors.Is(err, notmuch.ErrIgnored) {
+ if err != nil && !errors.Is(err, notmuch.ErrIgnored) {
return nil, err
}
}