From f2ddac4cbc895837ddcc55015fae112f9859cd0a Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Tue, 20 Oct 2020 22:07:24 +0200 Subject: New upstream version 1.27.91 --- clients/cli/nmcli.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'clients/cli/nmcli.c') diff --git a/clients/cli/nmcli.c b/clients/cli/nmcli.c index 740cc604..44795408 100644 --- a/clients/cli/nmcli.c +++ b/clients/cli/nmcli.c @@ -344,11 +344,21 @@ check_colors_check_enabled_one_file(const char *base_dir, const char *name, cons static char * check_colors_check_palette_one_file(const char *base_dir, const char *name, const char *term) { - gs_free char *filename = check_colors_construct_filename(base_dir, name, term, "schem"); - char * contents; + static const char *const extensions[] = { + "scheme", + "schem", + }; + guint i; + + for (i = 0; i < G_N_ELEMENTS(extensions); i++) { + gs_free char *filename = NULL; + char * contents; + + filename = check_colors_construct_filename(base_dir, name, term, extensions[i]); + if (g_file_get_contents(filename, &contents, NULL, NULL)) + return contents; + } - if (g_file_get_contents(filename, &contents, NULL, NULL)) - return contents; return NULL; } -- cgit 1.3.0-6-gf8a5