X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=notmuch-config.c;h=e5b4db45fdf53dcb4254bec0b321e1dfcbcf719e;hb=34fec91e17629a6a095bd5930e020dfeaddff245;hp=16e869162e5397e4972b9d2e444a8b5c8822b1f1;hpb=1459217e17e94277495c5c644b5a4ca1651c9452;p=notmuch diff --git a/notmuch-config.c b/notmuch-config.c index 16e86916..e5b4db45 100644 --- a/notmuch-config.c +++ b/notmuch-config.c @@ -24,6 +24,7 @@ #include #include +#include "path-util.h" #include "unicode-util.h" static const char toplevel_config_comment[] = @@ -327,7 +328,7 @@ notmuch_conffile_save (notmuch_conffile_t *config) } /* Try not to overwrite symlinks. */ - filename = canonicalize_file_name (config->filename); + filename = notmuch_canonicalize_file_name (config->filename); if (! filename) { if (errno == ENOENT) { filename = strdup (config->filename); @@ -537,11 +538,18 @@ notmuch_config_command_get (notmuch_database_t *notmuch, char *item) { notmuch_config_values_t *list; - for (list = notmuch_config_get_values_string (notmuch, item); - notmuch_config_values_valid (list); - notmuch_config_values_move_to_next (list)) { - const char *val = notmuch_config_values_get (list); - puts (val); + if (STRNCMP_LITERAL (item, BUILT_WITH_PREFIX) == 0) { + if (notmuch_built_with (item + strlen (BUILT_WITH_PREFIX))) + puts ("true"); + else + puts ("false"); + } else { + for (list = notmuch_config_get_values_string (notmuch, item); + notmuch_config_values_valid (list); + notmuch_config_values_move_to_next (list)) { + const char *val = notmuch_config_values_get (list); + puts (val); + } } return EXIT_SUCCESS; }