From 59f85019f6369719ba5b212934be71fcd94f910c Mon Sep 17 00:00:00 2001 From: Michael Larson Date: Thu, 10 Apr 2008 16:15:42 -0700 Subject: Revert "fix for bug 2525" This reverts commit f352a460fdf15ac927d1deb4672c42b334eb8e67. --- src/cli_val_engine.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/cli_val_engine.c b/src/cli_val_engine.c index 786c0cd..adf40a4 100644 --- a/src/cli_val_engine.c +++ b/src/cli_val_engine.c @@ -217,12 +217,10 @@ static char** clind_get_current_value(clind_path_ref cfg_path, struct stat statbuf; /* Directory reference: */ - if(!check_existence) { - if (lstat(cfg_path_string, &statbuf) == 0) { - ret=(char**)realloc(ret,sizeof(char*)*1); - ret[0]=clind_unescape(cfg_end); - *ret_size=1; - } + if(!check_existence || (lstat(cfg_path_string, &statbuf) == 0)) { + ret=(char**)realloc(ret,sizeof(char*)*1); + ret[0]=clind_unescape(cfg_end); + *ret_size=1; } else { /* we are checking existence, and it doesn't exist */ /* return empty string */ @@ -232,7 +230,7 @@ static char** clind_get_current_value(clind_path_ref cfg_path, *ret_size = 1; } } - + if(ret) { if(tmpl_end && (strcmp(tmpl_end,NODE_TAG)==0)) { /* since it's a tag, it should be treated as a value */ -- cgit v1.2.3