FS-5131 --resolve indeed, nice catch

This commit is contained in:
Anthony Minessale
2013-02-28 09:28:00 -06:00
parent 1b8ef1842e
commit bf93eb47e9
2 changed files with 33 additions and 12 deletions
+12 -4
View File
@@ -919,11 +919,19 @@ SWITCH_DECLARE(char *) switch_find_end_paren(const char *s, char open, char clos
static inline switch_bool_t switch_is_file_path(const char *file)
{
const char *e;
int r;
int r, x;
if (*file == '[' && *(file + 1) == *SWITCH_PATH_SEPARATOR) {
if ((e = switch_find_end_paren(file, '[', ']'))) {
file = e + 1;
for (x = 0; x < 2; x++) {
if (*file == '[' && *(file + 1) == *SWITCH_PATH_SEPARATOR) {
if ((e = switch_find_end_paren(file, '[', ']'))) {
file = e + 1;
}
} else if (*file == '{') {
if ((e = switch_find_end_paren(file, '{', '}'))) {
file = e + 1;
}
} else {
break;
}
}
#ifdef WIN32