+ if (command->mode & NOTMUCH_COMMAND_DATABASE_EARLY) {
+ char *status_string = NULL;
+ notmuch_database_mode_t mode;
+ if (command->mode & NOTMUCH_COMMAND_DATABASE_WRITE)
+ mode = NOTMUCH_DATABASE_MODE_READ_WRITE;
+ else
+ mode = NOTMUCH_DATABASE_MODE_READ_ONLY;
+
+ if (notmuch_database_open_with_config (NULL,
+ mode,
+ config_file_name,
+ NULL,
+ ¬much,
+ &status_string)) {
+ if (status_string) {
+ fputs (status_string, stderr);
+ free (status_string);
+ }