mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-22 09:24:54 +01:00
cli/new: replace newly deprecated n_m_has_maildir_flag
Boolean return values have no out-of-band-values to signal errors. The change here is that a (somewhat unlikely) fatal error after indexing will now be caught.
This commit is contained in:
parent
b7572ceb14
commit
485c32b1f3
1 changed files with 5 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue