]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch-insert.c
util: Fix two corner-cases in boolean term quoting function
[notmuch] / notmuch-insert.c
index cd6de88f6891d230bd22048cfa9eee2d94018057..6752fc8de25531a161cd6d119518c2d9cc338cf5 100644 (file)
@@ -431,6 +431,15 @@ notmuch_insert_command (notmuch_config_t *config, int argc, char *argv[])
        return EXIT_FAILURE;
     }
     for (i = 0; i < new_tags_length; i++) {
+       const char *error_msg;
+
+       error_msg = illegal_tag (new_tags[i], FALSE);
+       if (error_msg) {
+           fprintf (stderr, "Error: tag '%s' in new.tags: %s\n",
+                    new_tags[i],  error_msg);
+           return EXIT_FAILURE;
+       }
+
        if (tag_op_list_append (tag_ops, new_tags[i], FALSE))
            return EXIT_FAILURE;
     }