aboutsummaryrefslogtreecommitdiffstats
path: root/worker
diff options
context:
space:
mode:
authorBence Ferdinandy <bence@ferdinandy.com>2024-07-11 11:34:18 +0200
committerRobin Jarry <robin@jarry.cc>2024-08-20 11:50:55 +0200
commita890fcb435e223897e9cacd92fc95673af45fb81 (patch)
tree0fd5958a6c23b55228cabbc241925c025c8b5b4d /worker
parent7dd0fdeda6c9a0d2426e88c221d6ad37561dd83f (diff)
downloadaerc-a890fcb435e223897e9cacd92fc95673af45fb81.tar.gz
maildir: only abort directory listing if there are 0 uids
If there is an error in container.UIDs, we will abort handling the message list, resulting in showing the number of messages by the directory name, but having an empty message list showing. Only return with err, if UIDs actually returned 0 messages. References: https://todo.sr.ht/~rjarry/aerc/215 Signed-off-by: Bence Ferdinandy <bence@ferdinandy.com> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'worker')
-rw-r--r--worker/maildir/worker.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/worker/maildir/worker.go b/worker/maildir/worker.go
index c733ddc6..7ff5093d 100644
--- a/worker/maildir/worker.go
+++ b/worker/maildir/worker.go
@@ -554,7 +554,7 @@ func (w *Worker) handleFetchDirectoryThreaded(
}
} else {
uids, err = w.c.UIDs(*w.selected)
- if err != nil {
+ if err != nil && len(uids) == 0 {
w.worker.Errorf("failed scanning uids: %v", err)
return err
}