diff options
author | inwit <inwit@sindominio.net> | 2022-11-04 14:21:56 +0100 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2022-11-09 21:16:33 +0100 |
commit | 7ce091bc13eef9e59aef3c357b85cd918a8594b3 (patch) | |
tree | 21ffd40332a003a7dcfa031d96e30129840c641c /worker/notmuch | |
parent | 20554d8460e96a408cfd779e1158dec78b639028 (diff) | |
download | aerc-7ce091bc13eef9e59aef3c357b85cd918a8594b3.tar.gz |
notmuch: allow whitespace before '=' in query-map
When reading the query-map file, any white spaces before the '=' were read as
part of the query name. Trim any leading and trailing white space from the
query name.
Signed-off-by: inwit <inwit@sindominio.net>
Acked-by: Tim Culverhouse <tim@timculverhouse.com>
Diffstat (limited to 'worker/notmuch')
-rw-r--r-- | worker/notmuch/worker.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/worker/notmuch/worker.go b/worker/notmuch/worker.go index 13c9d976..3b0ee829 100644 --- a/worker/notmuch/worker.go +++ b/worker/notmuch/worker.go @@ -572,8 +572,8 @@ func (w *worker) loadQueryMap(acctConfig *config.AccountConfig) error { if len(split) != 2 { return fmt.Errorf("%v: invalid line %q, want name=query", file, line) } - w.nameQueryMap[split[0]] = split[1] - w.queryMapOrder = append(w.queryMapOrder, split[0]) + w.nameQueryMap[strings.TrimSpace(split[0])] = split[1] + w.queryMapOrder = append(w.queryMapOrder, strings.TrimSpace(split[0])) } return nil } |