]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch-new.c
cli/new: replace newly deprecated n_m_has_maildir_flag
[notmuch] / notmuch-new.c
index f079f62a63968c7ce19a2045de428864eb82e399..4075d395fd4ff89a992fbf9ed7cfbdc7a7761839 100644 (file)
@@ -388,8 +388,11 @@ add_file (notmuch_database_t *notmuch, const char *filename,
            notmuch_message_maildir_flags_to_tags (message);
 
        for (tag = state->new_tags; *tag != NULL; tag++) {
-           if (strcmp ("unread", *tag) != 0 ||
-               ! notmuch_message_has_maildir_flag (message, 'S')) {
+           notmuch_bool_t is_set;
+           /* Currently all errors from has_maildir_flag are fatal */
+           if ((status = notmuch_message_has_maildir_flag_st (message, 'S', &is_set)))
+               goto DONE;
+           if (strcmp ("unread", *tag) != 0 || ! is_set) {
                notmuch_message_add_tag (message, *tag);
            }
        }