X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=lib%2Fmessage.cc;h=bbac2ffaf87da987b1c7f05244ce1caf801831c1;hb=750231bae8a0bdb3273c2f9a74da14327fbc5d52;hp=ed96477f98b7773d6905dd5325fe3d38ec28de3d;hpb=93ab4c7d119bb751c4d7297cb18a6f5eb50ae478;p=notmuch diff --git a/lib/message.cc b/lib/message.cc index ed96477f..bbac2ffa 100644 --- a/lib/message.cc +++ b/lib/message.cc @@ -1074,7 +1074,7 @@ notmuch_message_maildir_flags_to_tags (notmuch_message_t *message) const char *flags; notmuch_status_t status; notmuch_filenames_t *filenames; - const char *filename; + const char *filename, *dir; char *combined_flags = talloc_strdup (message, ""); unsigned i; int seen_maildir_info = 0; @@ -1084,6 +1084,10 @@ notmuch_message_maildir_flags_to_tags (notmuch_message_t *message) notmuch_filenames_move_to_next (filenames)) { filename = notmuch_filenames_get (filenames); + dir = _filename_is_in_maildir (filename); + + if (! dir) + continue; flags = strstr (filename, ":2,"); if (! flags)