mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-25 12:28:09 +01:00
test: convert random-corpus to use n_d_open_with_config
Remove one more usage of notmuch_config_get_database_path
This commit is contained in:
parent
a6a580e616
commit
79a4b2e9e7
1 changed files with 6 additions and 7 deletions
|
@ -141,7 +141,6 @@ main (int argc, char **argv)
|
||||||
void *ctx = talloc_new (NULL);
|
void *ctx = talloc_new (NULL);
|
||||||
|
|
||||||
const char *config_path = NULL;
|
const char *config_path = NULL;
|
||||||
notmuch_config_t *config;
|
|
||||||
notmuch_database_t *notmuch;
|
notmuch_database_t *notmuch;
|
||||||
|
|
||||||
int num_messages = 500;
|
int num_messages = 500;
|
||||||
|
@ -179,12 +178,12 @@ main (int argc, char **argv)
|
||||||
exit (1);
|
exit (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
config = notmuch_config_open (ctx, config_path, false);
|
if (notmuch_database_open_with_config (NULL,
|
||||||
if (config == NULL)
|
NOTMUCH_DATABASE_MODE_READ_WRITE,
|
||||||
return 1;
|
config_path,
|
||||||
|
NULL,
|
||||||
if (notmuch_database_open (notmuch_config_get_database_path (config),
|
¬much,
|
||||||
NOTMUCH_DATABASE_MODE_READ_WRITE, ¬much))
|
NULL))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
srandom (seed);
|
srandom (seed);
|
||||||
|
|
Loading…
Reference in a new issue