unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] CLI/new: check status of notmuch_message_maildir_flags_to_tags
@ 2021-05-08 23:03 David Bremner
  2021-05-19 12:03 ` David Bremner
  0 siblings, 1 reply; 2+ messages in thread
From: David Bremner @ 2021-05-08 23:03 UTC (permalink / raw)
  To: notmuch; +Cc: David Bremner

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] CLI/new: check status of notmuch_message_maildir_flags_to_tags
  2021-05-08 23:03 [PATCH] CLI/new: check status of notmuch_message_maildir_flags_to_tags David Bremner
@ 2021-05-19 12:03 ` David Bremner
  0 siblings, 0 replies; 2+ messages in thread
From: David Bremner @ 2021-05-19 12:03 UTC (permalink / raw)
  To: notmuch

David Bremner <david@tethera.net> writes:

> This improves error reporting since it prints the specifics of the exception.
> ---

applied, with whitespace cleanup, to master.

d

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-19 12:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-08 23:03 [PATCH] CLI/new: check status of notmuch_message_maildir_flags_to_tags David Bremner
2021-05-19 12:03 ` David Bremner

unofficial mirror of notmuch@notmuchmail.org

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/notmuch/0 notmuch/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 notmuch notmuch/ https://yhetil.org/notmuch \
		notmuch@notmuchmail.org
	public-inbox-index notmuch

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.mail.notmuch.general
	nntp://news.gmane.io/gmane.mail.notmuch.general


code repositories for project(s) associated with this inbox:

	notmuch.git.git (no URL configured)

AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git