aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-20 17:10:17 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-20 17:10:17 +0000
commitb9d1db611548f8f348436856d6a92da500316959 (patch)
treeba192f4e1784c4417b1566c2d43bddcbed78fc23
parent0ae066df995dcdebbf3b05ecbd41559435bc301f (diff)
(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/branches/1.4@76067 f38db490-d61c-443f-a65b-d21fe96a405b
-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 38d3e5399..7c4e04e83 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;