This improves error reporting since it prints the specifics of the exception.
---
notmuch-new.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/notmuch-new.c b/notmuch-new.c
index 1169184f..119aea20 100644
--- a/notmuch-new.c
+++ b/notmuch-new.c
@@ -404,8 +404,11 @@ add_file (notmuch_database_t *notmuch, const char *filename,
break;
/* Non-fatal issues (go on to next file). */
case NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID:
- if (state->synchronize_flags)
- notmuch_message_maildir_flags_to_tags (message);
+ if (state->synchronize_flags) {
+ status = notmuch_message_maildir_flags_to_tags (message);
+ if (print_status_message("add_file", message, status))
+ goto DONE;
+ }
break;
case NOTMUCH_STATUS_FILE_NOT_EMAIL:
fprintf (stderr, "Note: Ignoring non-mail file: %s\n", filename);
--
2.30.2
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org