goto DONE;
}
- if (is_mbox) {
- if (! g_mime_parser_eos (parser)) {
- /* This is a multi-message mbox. */
- status = NOTMUCH_STATUS_FILE_NOT_EMAIL;
- goto DONE;
- }
+ if (is_mbox && ! g_mime_parser_eos (parser)) {
/*
- * For historical reasons, we support single-message mboxes,
- * but this behavior is likely to change in the future, so
- * warn.
+ * This is a multi-message mbox. (For historical reasons, we
+ * do support single-message mboxes.)
*/
- static notmuch_bool_t mbox_warning = FALSE;
- if (! mbox_warning) {
- mbox_warning = TRUE;
- fprintf (stderr, "\
-Warning: %s is an mbox containing a single message,\n\
-likely caused by misconfigured mail delivery. Support for single-message\n\
-mboxes is deprecated and may be removed in the future.\n", message->filename);
- }
+ status = NOTMUCH_STATUS_FILE_NOT_EMAIL;
}
DONE:
Body.
EOF
output=$(NOTMUCH_NEW 2>&1)
-test_expect_equal "$output" \
-"Warning: ${MAIL_DIR}/mbox_file1 is an mbox containing a single message,
-likely caused by misconfigured mail delivery. Support for single-message
-mboxes is deprecated and may be removed in the future.
-Added 1 new message to the database."
+test_expect_equal "$output" "Added 1 new message to the database."
# This test requires that notmuch new has been run at least once.
test_begin_subtest "Skip and report non-mail files"