diff options
| author | Michael Biebl <biebl@debian.org> | 2020-10-20 22:08:23 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2020-10-20 22:08:23 +0200 |
| commit | 769cfe6fb306e976faea4070948c07f4e61bf849 (patch) | |
| tree | 0c2235a59a607a2443c195c741c60c9a59598e51 /clients/cli/nmcli.c | |
| parent | b4dab9a9dd24d8d70e1bb288078570e85ad43b96 (diff) | |
| parent | f2ddac4cbc895837ddcc55015fae112f9859cd0a (diff) | |
Update upstream source from tag 'upstream/1.27.91'
Update to upstream version '1.27.91' with Debian dir 00b16bc3e33f8058a60e79863d76fe240a94309d
Diffstat (limited to 'clients/cli/nmcli.c')
| -rw-r--r-- | clients/cli/nmcli.c | 18 |
1 files changed, 14 insertions, 4 deletions
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; } |