1
0
Fork 0
mirror of https://git.sr.ht/~rjarry/aerc synced 2025-07-04 08:00:21 +02:00
aerc/worker/middleware
Simon Martin 3eb0046dde foldermap: map directory in Messages{Moved,Copied} and RemoveDirectory
When moving an unread message from current directory C to directory D,
the unseen count for C is properly decremented. However the one for D is
not consistently handled:

- If D is not folder-mapped, it's incremented, as expected.
- If D is folder-mapped, it's unchanged, a clear bug.

The problem is that the folderMapper.PostMessage is not intercepting and
de-mapping three commands that manipulate directory names.

This patch handles all them (I grepped for all PostMessage calls and I
think I got all the missing ones). It also adds an error log to
AccountView.updateDirCounts in case it processes a message that
references an unknown directory, a likely folder mapping bug.

Signed-off-by: Simon Martin <simon@nasilyan.com>
Reviewed-by: Moritz Poldrack <moritz@poldrack.dev>
Acked-by: Robin Jarry <robin@jarry.cc>
2025-03-30 21:31:28 +02:00
..
foldermapper.go foldermap: map directory in Messages{Moved,Copied} and RemoveDirectory 2025-03-30 21:31:28 +02:00
foldermapper_test.go foldermap: make folder-map syntax more expressive 2023-07-14 23:11:42 +02:00
gmailworker.go imap: extend SEARCH with X-GM-RAW for full Gmail search syntax 2024-08-04 18:24:42 +02:00