cli/config: add accessor for config file name

This is intended for use in temporary code transitioning to the new
configuration system. The name is chosen to avoid cluttering the
notmuch_config_* namespace further with non-library functions.
This commit is contained in:
David Bremner 2020-08-08 11:16:51 -03:00
parent d613d10ddd
commit dd6b507099
2 changed files with 5 additions and 0 deletions

View file

@ -334,6 +334,8 @@ void
notmuch_config_set_search_exclude_tags (notmuch_config_t *config, notmuch_config_set_search_exclude_tags (notmuch_config_t *config,
const char *list[], const char *list[],
size_t length); size_t length);
const char *
_notmuch_config_get_path (notmuch_config_t *config);
int int
notmuch_run_hook (const char *db_path, const char *hook); notmuch_run_hook (const char *db_path, const char *hook);

View file

@ -510,6 +510,9 @@ notmuch_config_close (notmuch_config_t *config)
talloc_free (config); talloc_free (config);
} }
const char *_notmuch_config_get_path (notmuch_config_t *config) {
return config->filename;
}
/* Save any changes made to the notmuch configuration. /* Save any changes made to the notmuch configuration.
* *
* Any comments originally in the file will be preserved. * Any comments originally in the file will be preserved.