fix backspace path under windows - handles any order

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16182 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Jeff Lenk 2010-01-06 15:57:36 +00:00
parent b9681e5af5
commit da7f9715ec
1 changed files with 4 additions and 3 deletions

View File

@ -1484,10 +1484,11 @@ SWITCH_DECLARE(switch_xml_t) switch_xml_parse_file(const char *file)
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;
}