[Freeswitch-svn] [commit] r6036 - freeswitch/trunk/src

Freeswitch SVN anthm at freeswitch.org
Tue Oct 23 15:32:36 EDT 2007


Author: anthm
Date: Tue Oct 23 15:32:36 2007
New Revision: 6036

Modified:
   freeswitch/trunk/src/switch_xml.c

Log:
fix FSCORE-55

Modified: freeswitch/trunk/src/switch_xml.c
==============================================================================
--- freeswitch/trunk/src/switch_xml.c	(original)
+++ freeswitch/trunk/src/switch_xml.c	Tue Oct 23 15:32:36 2007
@@ -956,9 +956,12 @@
 			*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 @@
 
     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) {



More information about the Freeswitch-svn mailing list