diff options
| author | David Bremner <david@tethera.net> | 2016-03-29 23:03:02 -0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2016-03-29 23:07:00 -0300 |
| commit | 6e6bafed0f88f914da34ec55087418756e485e52 (patch) | |
| tree | f46179ae45d99c7372e275494272dc20fe6ed7aa /notmuch-new.c | |
| parent | ccf0db161590e2aac7db0e049547c347ab4db528 (diff) | |
cli/new: add better error messages for FILE_ERROR
The code in add_file seems to assume that NOTMUCH_STATUS_FILE_ERROR is
never returned from add_message. This turns out to be false (although it
seems to only happen in certain fairly rare race conditions).
Diffstat (limited to 'notmuch-new.c')
| -rw-r--r-- | notmuch-new.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/notmuch-new.c b/notmuch-new.c index e5037761..04cb5cac 100644 --- a/notmuch-new.c +++ b/notmuch-new.c @@ -281,6 +281,10 @@ add_file (notmuch_database_t *notmuch, const char *filename, fprintf (stderr, "Note: Ignoring non-mail file: %s\n", filename); break; /* Fatal issues. Don't process anymore. */ + case NOTMUCH_STATUS_FILE_ERROR: + fprintf (stderr, "Unexpected error with file %s\n", filename); + (void) print_status_database ("add_file", notmuch, status); + goto DONE; case NOTMUCH_STATUS_READ_ONLY_DATABASE: case NOTMUCH_STATUS_XAPIAN_EXCEPTION: case NOTMUCH_STATUS_OUT_OF_MEMORY: |
