Revision
16182
Author
jlenk
Date
2010-01-06 09:57:36 -0600 (Wed, 06 Jan 2010)

Log Message

fix backspace path under windows - handles any order

Modified Paths

Diff

Modified: freeswitch/trunk/src/switch_xml.c (16181 => 16182)


--- freeswitch/trunk/src/switch_xml.c	2010-01-06 15:43:18 UTC (rev 16181)
+++ freeswitch/trunk/src/switch_xml.c	2010-01-06 15:57:36 UTC (rev 16182)
@@ -1484,10 +1484,11 @@
 	int fd = -1, write_fd = -1;
 	switch_xml_t xml = NULL;
 	char *new_file = NULL;
-	const char *abs;
+	const char *abs, *absw;
 
-	if ((abs = strrchr(file, '/')) || (abs = strrchr(file, '\\'))) {
-		abs++;
+	abs = strrchr(file, '/'); absw = strrchr(file, '\\');
+	if (abs || absw) {
+		abs > absw ? abs++ : (abs = ++absw);
 	} else {
 		abs = file;
 	}