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);
}
}
}
int
-notmuch_new_command (notmuch_config_t *config, int argc, char *argv[])
+notmuch_new_command (notmuch_config_t *config, unused(notmuch_database_t *notmuch), int argc, char *argv[])
{
notmuch_database_t *notmuch;
add_files_state_t add_files_state = {