X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-show.c;h=7021008ee64a558e583684f37e795cfe49841d08;hp=6400594898718ac606364f894fabeee693133f68;hb=242d5a3ed5ed85bb935c8ed4a4678d7596d8534d;hpb=3721bd45d72e50436ee760b03ae533d49bbb8724 diff --git a/notmuch-show.c b/notmuch-show.c index 64005948..7021008e 100644 --- a/notmuch-show.c +++ b/notmuch-show.c @@ -1177,11 +1177,19 @@ notmuch_show_command (notmuch_config_t *config, int argc, char *argv[]) const char **search_exclude_tags; size_t search_exclude_tags_length; unsigned int i; + notmuch_status_t status; search_exclude_tags = notmuch_config_get_search_exclude_tags (config, &search_exclude_tags_length); - for (i = 0; i < search_exclude_tags_length; i++) - notmuch_query_add_tag_exclude (query, search_exclude_tags[i]); + + for (i = 0; i < search_exclude_tags_length; i++) { + status = notmuch_query_add_tag_exclude (query, search_exclude_tags[i]); + if (status && status != NOTMUCH_STATUS_IGNORED) { + print_status_query ("notmuch show", query, status); + ret = -1; + goto DONE; + } + } if (exclude == EXCLUDE_FALSE) { notmuch_query_set_omit_excluded (query, FALSE); @@ -1191,6 +1199,7 @@ notmuch_show_command (notmuch_config_t *config, int argc, char *argv[]) ret = do_show (config, query, formatter, sprinter, ¶ms); } + DONE: notmuch_crypto_cleanup (¶ms.crypto); notmuch_query_destroy (query); notmuch_database_destroy (notmuch);