Merged revisions 76067 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r76067 | file | 2007-07-20 14:10:17 -0300 (Fri, 20 Jul 2007) | 6 lines (closes issue #10246) Reported by: fkasumovic Patches: res_conver.patch uploaded by fkasumovic (license #101) Use the last occurance of . to find the extension, not the first occurance. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76070 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
parent
8a72f0f554
commit
6d6295d82f
|
@ -45,7 +45,10 @@ static int split_ext(char *filename, char **name, char **ext)
|
||||||
{
|
{
|
||||||
*name = *ext = filename;
|
*name = *ext = filename;
|
||||||
|
|
||||||
strsep(ext, ".");
|
if ((*ext = strrchr(filename, '.'))) {
|
||||||
|
**ext = '\0';
|
||||||
|
(*ext)++;
|
||||||
|
}
|
||||||
|
|
||||||
if (ast_strlen_zero(*name) || ast_strlen_zero(*ext))
|
if (ast_strlen_zero(*name) || ast_strlen_zero(*ext))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Reference in New Issue