From 2414ad8c694f6a1abd8dc6a616de6ee90f3c3ea5 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Tue, 23 Oct 2007 19:32:36 +0000 Subject: [PATCH] fix FSCORE-55 git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6036 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_xml.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/switch_xml.c b/src/switch_xml.c index 4efc62eb7d..651fba5408 100644 --- a/src/switch_xml.c +++ b/src/switch_xml.c @@ -956,9 +956,12 @@ static int preprocess_glob(const char *pattern, int write_fd, int rlevel) *p = '\0'; } } else { - dir_path = SWITCH_GLOBAL_dirs.conf_dir; p = switch_core_sprintf(pool, "%s%s%s", SWITCH_GLOBAL_dirs.conf_dir, SWITCH_PATH_SEPARATOR, pattern); pattern = p; + dir_path = switch_core_strdup(pool, pattern); + if ((p = strrchr(dir_path, *SWITCH_PATH_SEPARATOR))) { + *p = '\0'; + } } switch_match_glob(pattern, &result, pool); @@ -967,7 +970,6 @@ static int preprocess_glob(const char *pattern, int write_fd, int rlevel) for (i = 0; i < result->nelts; i++) { char *path = list[i]; - if (strcmp(path, ".") && strcmp(path, "..")) { p = switch_core_sprintf(pool, "%s%s%s", dir_path, SWITCH_PATH_SEPARATOR, path); if (preprocess(p, write_fd, rlevel) < 0) {