diff options
| author | David Bremner <david@tethera.net> | 2022-01-17 19:54:53 -0400 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2022-01-24 09:32:39 -0400 |
| commit | 88633bc7a79d47ba96879f698ec2267f2d3f6766 (patch) | |
| tree | 2fc3d184f872a390ef83d721029493cc606dbddd /notmuch-config.c | |
| parent | 82e1279790bb352c5716ad25703283b09f42730f (diff) | |
CLI/setup: special case single item lists
This matches the heuristic used by "notmuch config set" to decide if
something is a list.
This change fixes the bug reported at [1].
[1]: id:6O3LTUhoXlrnkPWCtPJCP4cagU7mFVEdyTpcC_37BoSzStlARXDBa7oczy6hB0jyjGjBQvgj_jFV58cw0aNx-jUg1h1O-FQ7820k68C0X4M=@protonmail.com
Diffstat (limited to 'notmuch-config.c')
| -rw-r--r-- | notmuch-config.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/notmuch-config.c b/notmuch-config.c index 11d8d68b..e9456d79 100644 --- a/notmuch-config.c +++ b/notmuch-config.c @@ -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 |
