]> git.cworth.org Git - notmuch/commitdiff
cli/config: add accessor for config file name
authorDavid Bremner <david@tethera.net>
Sat, 8 Aug 2020 14:16:51 +0000 (11:16 -0300)
committerDavid Bremner <david@tethera.net>
Sat, 6 Feb 2021 23:25:35 +0000 (19:25 -0400)
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.

notmuch-client.h
notmuch-config.c

index e8fb032312db0ef1d1e3f319a34070d43d35bfb1..a026002a27b0904c76fdb871f259db85627ea2ff 100644 (file)
@@ -334,6 +334,8 @@ void
 notmuch_config_set_search_exclude_tags (notmuch_config_t *config,
                                        const char *list[],
                                        size_t length);
+const char *
+_notmuch_config_get_path (notmuch_config_t *config);
 
 int
 notmuch_run_hook (const char *db_path, const char *hook);
index 4fa274c73b15222432954efc52b4ead0f35ec660..0193401fe4b531df971a0b80933ccee709fc5745 100644 (file)
@@ -510,6 +510,9 @@ notmuch_config_close (notmuch_config_t *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.
  *
  * Any comments originally in the file will be preserved.