]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch-config.c
lib: strip trailing '/' from pathnames (sexp queries).
[notmuch] / notmuch-config.c
index c0c91cc870e451257c0f2a1837fc24c1bdadb236..e9456d794456c080e81abbd6a00efcb6b123c3c4 100644 (file)
@@ -383,7 +383,10 @@ _config_set_list (notmuch_conffile_t *config,
                  const char *list[],
                  size_t length)
 {
-    g_key_file_set_string_list (config->key_file, group, key, list, length);
+    if (length > 1)
+       g_key_file_set_string_list (config->key_file, group, key, list, length);
+    else
+       g_key_file_set_string (config->key_file, group, key, list[0]);
 }
 
 void
@@ -517,6 +520,7 @@ static const struct config_key
     { "index.decrypt",   false,  NULL },
     { "index.header.",   true,   validate_field_name },
     { "query.",          true,   NULL },
+    { "squery.",         true,   validate_field_name },
 };
 
 static const config_key_info_t *
@@ -679,9 +683,9 @@ _notmuch_config_list_built_with ()
     printf ("%sretry_lock=%s\n",
            BUILT_WITH_PREFIX,
            notmuch_built_with ("retry_lock") ? "true" : "false");
-    printf ("%ssexpr_query=%s\n",
+    printf ("%ssexp_queries=%s\n",
            BUILT_WITH_PREFIX,
-           notmuch_built_with ("sexpr_query") ? "true" : "false");
+           notmuch_built_with ("sexp_queries") ? "true" : "false");
 }
 
 static int