Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use uidified uid in uid-cache for the "new" subfolder #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 10 additions & 14 deletions folders/maildir/folder.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -412,20 +412,16 @@
message)))
(declare #-(or sbcl cmu)(dynamic-extent #'push-message))
(let ((uid-cache (uid-cache folder)))

(mel.filesystem:map-directory
(lambda (file)
(setf (gethash file uid-cache) (cons :new file))
(funcall fn (push-message file)))
(namestring (truename (new-mail folder))))

(mel.filesystem:map-directory
(lambda (file)
(declare (type string file))
(let ((uid (uidify file)))
(setf (gethash uid uid-cache) (cons :cur file))
(funcall fn (push-message file))))
(namestring (truename (current-mail folder))))))
(dolist (folder-spec (list (list :new (new-mail folder))
(list :cur (current-mail folder))))
(destructuring-bind (symbol subfolder) folder-spec
(mel.filesystem:map-directory
(lambda (file)
(declare (type string file))
(let ((uid (uidify file)))
(setf (gethash uid uid-cache) (cons symbol file))
(funcall fn (push-message file))))
(namestring (truename subfolder)))))))

(nreverse messages)))))

Expand Down