diff options
Diffstat (limited to 'src/cli_val_engine.c')
-rw-r--r-- | src/cli_val_engine.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/cli_val_engine.c b/src/cli_val_engine.c index adf40a4..a81f413 100644 --- a/src/cli_val_engine.c +++ b/src/cli_val_engine.c @@ -56,6 +56,9 @@ #include "cli_val_engine.h" + +static int is_multi_node(clind_path_ref tmpl_path); + /********************* * Data definitions * @@ -129,6 +132,13 @@ static char** clind_get_current_value(clind_path_ref cfg_path, int value_ref = 0; *ret_size=0; + + if (check_existence) { + if (is_multi_node(tmpl_path)) { + check_existence = FALSE; + } + } + DPRINT("get_current_value cfg[%s] tmpl[%s] chkexist=%d\n", clind_path_get_path_string(cfg_path), clind_path_get_path_string(tmpl_path), @@ -217,6 +227,7 @@ static char** clind_get_current_value(clind_path_ref cfg_path, struct stat statbuf; /* Directory reference: */ + if(!check_existence || (lstat(cfg_path_string, &statbuf) == 0)) { ret=(char**)realloc(ret,sizeof(char*)*1); ret[0]=clind_unescape(cfg_end); |