aboutsummaryrefslogtreecommitdiffhomepage
path: root/notmuch-new.c
diff options
context:
space:
mode:
authorGravatar Austin Clements <amdragon@MIT.EDU>2012-04-30 12:25:34 -0400
committerGravatar David Bremner <bremner@debian.org>2012-05-05 10:12:26 -0300
commitba5729421825e0ec9d38aa9d656553f329aa6f09 (patch)
tree70986a01237436403048962d2e1728c4998c9067 /notmuch-new.c
parent5fddc07dc31481453c1af186bf7da241c00cdbf1 (diff)
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.
Diffstat (limited to 'notmuch-new.c')
-rw-r--r--notmuch-new.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/notmuch-new.c b/notmuch-new.c
index 7788743d..cb720cc2 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, &notmuch))
+ return 1;
add_files_state.total_files = count;
} else {
if (notmuch_database_open (db_path, NOTMUCH_DATABASE_MODE_READ_WRITE,