summaryrefslogtreecommitdiff
path: root/res/res_convert.c
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2007-07-20 17:11:39 +0000
committerJoshua Colp <jcolp@digium.com>2007-07-20 17:11:39 +0000
commit2c2af928fe97915efdda15b82e7ca276f7a6f4ad (patch)
treeed19a1faa92e4033236e2097ba90cddc963af1cb /res/res_convert.c
parent66cae9269b59e13a6f42c486be00441b5ac72161 (diff)
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: https://origsvn.digium.com/svn/asterisk/trunk@76070 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_convert.c')
-rw-r--r--res/res_convert.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/res/res_convert.c b/res/res_convert.c
index 628381aa9..be3d177eb 100644
--- a/res/res_convert.c
+++ b/res/res_convert.c
@@ -45,7 +45,10 @@ static int split_ext(char *filename, char **name, char **ext)
{
*name = *ext = filename;
- strsep(ext, ".");
+ if ((*ext = strrchr(filename, '.'))) {
+ **ext = '\0';
+ (*ext)++;
+ }
if (ast_strlen_zero(*name) || ast_strlen_zero(*ext))
return -1;