From 2788078187c21e1713cbb86368ea4d91b2823bae Mon Sep 17 00:00:00 2001 From: Kirill Chibisov Date: Sat, 13 May 2023 23:13:42 +0300 Subject: notmuch: add option to provide path for account Add the "maildir-account-path" account configuration option to select the account relative to the "maildir-store" to have traditional maildir one tab per account behavior with notmuch. Signed-off-by: Kirill Chibisov Acked-by: Robin Jarry Tested-by: Bence Ferdinandy --- worker/notmuch/eventhandlers.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'worker/notmuch/eventhandlers.go') diff --git a/worker/notmuch/eventhandlers.go b/worker/notmuch/eventhandlers.go index ca92d7eb..a6ab7668 100644 --- a/worker/notmuch/eventhandlers.go +++ b/worker/notmuch/eventhandlers.go @@ -5,6 +5,7 @@ package notmuch import ( "fmt" + "path/filepath" "strconv" "git.sr.ht/~rjarry/aerc/worker/types" @@ -27,7 +28,8 @@ func (w *worker) handleUpdateDirCounts() error { return err } for name := range folders { - query := fmt.Sprintf("folder:%s", strconv.Quote(name)) + folder := filepath.Join(w.maildirAccountPath, name) + query := fmt.Sprintf("folder:%s", strconv.Quote(folder)) w.w.PostMessage(&types.DirectoryInfo{ Info: w.getDirectoryInfo(name, query), }, nil) -- cgit