diff options
| author | David Bremner <david@tethera.net> | 2020-07-13 20:51:07 -0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2020-07-20 08:54:42 -0300 |
| commit | 485c32b1f30ef74baccaf40777891f6ef9974634 (patch) | |
| tree | 56ea9a8558a193eebb44469196af8ac27ebaf868 | |
| parent | b7572ceb143773a988a4852ac3b7c85254009d0e (diff) | |
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.
| -rw-r--r-- | notmuch-new.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/notmuch-new.c b/notmuch-new.c index f079f62a..4075d395 100644 --- a/notmuch-new.c +++ b/notmuch-new.c @@ -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); } } |
