X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-count.c;h=a05b430d77ac8df14db982cc533c87b7e4f40886;hp=d3457bbe91bd07747ddee2c86e3fe1392cac80d3;hb=1e7dbf7abcf58407a5171e9030056f2ff9bec15a;hpb=86cbd215eb67d7b996c977352a50e70c101cb641 diff --git a/notmuch-count.c b/notmuch-count.c index d3457bbe..a05b430d 100644 --- a/notmuch-count.c +++ b/notmuch-count.c @@ -87,18 +87,23 @@ print_count (notmuch_database_t *notmuch, const char *query_str, return -1; } - for (i = 0; i < exclude_tags_length; i++) - notmuch_query_add_tag_exclude (query, exclude_tags[i]); + for (i = 0; i < exclude_tags_length; i++) { + status = notmuch_query_add_tag_exclude (query, exclude_tags[i]); + if (status && status != NOTMUCH_STATUS_IGNORED) { + print_status_query ("notmuch count", query, status); + return -1; + } + } switch (output) { case OUTPUT_MESSAGES: - status = notmuch_query_count_messages_st (query, &ucount); + status = notmuch_query_count_messages (query, &ucount); if (print_status_query ("notmuch count", query, status)) return -1; printf ("%u", ucount); break; case OUTPUT_THREADS: - status = notmuch_query_count_threads_st (query, &ucount); + status = notmuch_query_count_threads (query, &ucount); if (print_status_query ("notmuch count", query, status)) return -1; printf ("%u", ucount);