]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch-config.c
CLI/new: drop the write lock to run the pre-new hook.
[notmuch] / notmuch-config.c
index 19c2ddb36a292d1687c61d98d7072e10753029fb..e1a583e62788f2cce437e4f54ce0cc0591bd6261 100644 (file)
@@ -324,7 +324,7 @@ get_config_from_file (notmuch_config_t *config, bool create_new)
 notmuch_config_t *
 notmuch_config_open (void *ctx,
                     const char *filename,
-                    notmuch_config_mode_t config_mode)
+                    notmuch_command_mode_t config_mode)
 {
     GError *error = NULL;
     size_t tmp;
@@ -359,8 +359,8 @@ notmuch_config_open (void *ctx,
 
     config->key_file = g_key_file_new ();
 
-    if (config_mode & NOTMUCH_CONFIG_OPEN) {
-       bool create_new = (config_mode & NOTMUCH_CONFIG_CREATE) != 0;
+    if (config_mode & NOTMUCH_COMMAND_CONFIG_OPEN) {
+       bool create_new = (config_mode & NOTMUCH_COMMAND_CONFIG_CREATE) != 0;
 
        if (! get_config_from_file (config, create_new)) {
            talloc_free (config);
@@ -510,6 +510,11 @@ 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.
@@ -1102,7 +1107,8 @@ notmuch_config_command_list (notmuch_config_t *config)
 }
 
 int
-notmuch_config_command (notmuch_config_t *config, int argc, char *argv[])
+notmuch_config_command (notmuch_config_t *config, unused(notmuch_database_t *notmuch),
+                       int argc, char *argv[])
 {
     int ret;
     int opt_index;