]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch-count.c
lib: make notmuch_query_add_tag_exclude return a status value
[notmuch] / notmuch-count.c
index cf80ee25a102fc4f469fc26ce50c85bf8096eb1e..a05b430d77ac8df14db982cc533c87b7e4f40886 100644 (file)
@@ -87,8 +87,13 @@ 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: