diff options
author | Austin Clements <amdragon@MIT.EDU> | 2012-06-01 10:16:49 -0400 |
---|---|---|
committer | David Bremner <bremner@debian.org> | 2012-06-01 11:31:26 -0300 |
commit | c92e2bcd1c8808a64eac8068d88f0e62cd8c12a6 (patch) | |
tree | df831e4fb55a342adb65b63cd8d4030cd452d3c4 /contrib | |
parent | dd4c9b4cb607cf3cfc03f871de0b77cb88230f8a (diff) |
notmuch-deliver: Update to new notmuch_database_open API
Commit 5fddc07 changed this API, but missed this use of it.
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/notmuch-deliver/src/main.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/contrib/notmuch-deliver/src/main.c b/contrib/notmuch-deliver/src/main.c index 37d2919a..032b9d62 100644 --- a/contrib/notmuch-deliver/src/main.c +++ b/contrib/notmuch-deliver/src/main.c @@ -359,6 +359,7 @@ main(int argc, char **argv) GOptionContext *ctx; GError *error = NULL; notmuch_database_t *db; + notmuch_status_t status; ctx = g_option_context_new("[FOLDER]"); g_option_context_add_main_entries(ctx, options, PACKAGE); @@ -429,7 +430,14 @@ main(int argc, char **argv) maildir = g_strdup(db_path); g_debug("Opening notmuch database `%s'", db_path); - db = notmuch_database_open(db_path, NOTMUCH_DATABASE_MODE_READ_WRITE); + status = notmuch_database_open(db_path, NOTMUCH_DATABASE_MODE_READ_WRITE, + &db); + if (status) { + g_critical("Failed to open database `%s': %s", + db_path, notmuch_status_to_string(status)); + g_free(maildir); + return EX_SOFTWARE; + } g_free(db_path); if (db == NULL) return EX_SOFTWARE; |