mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-08 10:08:05 +02:00
config: skip shadowed run-config files in read_entire_config()
https://bugzilla.gnome.org/show_bug.cgi?id=773069
This commit is contained in:
parent
feff60ef3e
commit
49fcfcdfae
1 changed files with 3 additions and 2 deletions
|
|
@ -959,8 +959,9 @@ read_entire_config (const NMConfigCmdLineOptions *cli,
|
||||||
for (i = 0; i < system_confs->len; ) {
|
for (i = 0; i < system_confs->len; ) {
|
||||||
const char *filename = system_confs->pdata[i];
|
const char *filename = system_confs->pdata[i];
|
||||||
|
|
||||||
/* if a same named file exists in config_dir, skip it. */
|
/* if a same named file exists in config_dir or RUN_CONFIG_DIR, skip it. */
|
||||||
if (_nm_utils_strv_find_first ((char **) confs->pdata, confs->len, filename) >= 0) {
|
if (_nm_utils_strv_find_first ((char **) confs->pdata, confs->len, filename) >= 0 ||
|
||||||
|
_nm_utils_strv_find_first ((char **) run_confs->pdata, run_confs->len, filename) >= 0) {
|
||||||
g_ptr_array_remove_index (system_confs, i);
|
g_ptr_array_remove_index (system_confs, i);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue