-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net_imap: Fix misordering when traversing a maildir's new dir.
Previously, traversals of a maildir's cur dir and new dir both used maildir_ordered_traverse, which uses uidsort to sort the directory entries. However, this is invalid when traversing a maildir's new dir, as no UIDs have been assigned; this leads to an arbitrary an invalid sorting since uidsort assumes both inputs have a UID in the filename in order to sort them. This led to the order in which messages were added to the new dir not being preserved when assigned UIDs. Instead, we should just be using the entire filename by itself for sorting, since the filenames (when ordered) are already in the right order to assigning UIDs. So, use alphasort when traversing a new dir, which preserves the order in which messages were added to the mailbox.
- Loading branch information
1 parent
d86994c
commit 693f72b
Showing
3 changed files
with
34 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters