diff options
| author | David Bremner <david@tethera.net> | 2021-02-02 16:43:58 -0400 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2021-03-20 07:23:40 -0300 |
| commit | 6251e2bb9ee023d25b58384c8a49576086fdaba3 (patch) | |
| tree | dfec27a8a13bc9f02b9467330cba6361b2a48370 /lib/config.cc | |
| parent | 1383481d4a7cee3b59f354a203090c966a2a635e (diff) | |
lib: remove "path" from notmuch struct
This removes duplication between the struct element and the
configuration string_map entry. Create a simple wrapper for setting
the database path that makes sure the trailing / is stripped.
Diffstat (limited to 'lib/config.cc')
| -rw-r--r-- | lib/config.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/config.cc b/lib/config.cc index 6993e67f..483a02ef 100644 --- a/lib/config.cc +++ b/lib/config.cc @@ -496,5 +496,8 @@ notmuch_config_set (notmuch_database_t *notmuch, notmuch_config_key_t key, const void _notmuch_config_cache (notmuch_database_t *notmuch, notmuch_config_key_t key, const char *val) { + if (notmuch->config == NULL) + notmuch->config = _notmuch_string_map_create (notmuch); + _notmuch_string_map_set (notmuch->config, _notmuch_config_key_to_string (key), val); } |
