summaryrefslogtreecommitdiffstats
path: root/notmuch-new.c
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2021-05-08 20:03:28 -0300
committerDavid Bremner <david@tethera.net>2021-05-19 09:00:08 -0300
commitff07183a02a480b36e70284289607c1315ac3db7 (patch)
tree67970fb3d2dc675df375088e751cb6ab032e8316 /notmuch-new.c
parent564a83077a1bede8b4c8cb39909a135dfe3feb59 (diff)
CLI/new: check status of notmuch_message_maildir_flags_to_tags
This improves error reporting since it prints the specifics of the exception.
Diffstat (limited to 'notmuch-new.c')
-rw-r--r--notmuch-new.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/notmuch-new.c b/notmuch-new.c
index 1162e25a..1ee498fa 100644
--- a/notmuch-new.c
+++ b/notmuch-new.c
@@ -403,8 +403,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);