From ba5729421825e0ec9d38aa9d656553f329aa6f09 Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Mon, 30 Apr 2012 12:25:34 -0400 Subject: lib/cli: Make notmuch_database_create return a status code This is the notmuch_database_create equivalent of the previous change. In this case, there were places where errors were not being propagated correctly in notmuch_database_create or in calls to it. These have been fixed, using the new status value. --- notmuch-new.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'notmuch-new.c') diff --git a/notmuch-new.c b/notmuch-new.c index 7788743..cb720cc 100644 --- a/notmuch-new.c +++ b/notmuch-new.c @@ -900,7 +900,8 @@ notmuch_new_command (void *ctx, int argc, char *argv[]) return 1; printf ("Found %d total files (that's not much mail).\n", count); - notmuch = notmuch_database_create (db_path); + if (notmuch_database_create (db_path, ¬much)) + return 1; add_files_state.total_files = count; } else { if (notmuch_database_open (db_path, NOTMUCH_DATABASE_MODE_READ_WRITE, -- cgit v1.2.3