提交 2414ad8c authored 作者: Anthony Minessale's avatar Anthony Minessale

fix FSCORE-55

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6036 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 8cf22e70
......@@ -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) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论