aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2006-11-03 19:15:07 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2006-11-03 19:15:07 +0000
commit5e271d60c16695d38d2264a6c29ef86852b2e975 (patch)
tree0994fc95ef25ff2b12ca71bd663958f7d73c5a22 /apps
parent3094fdaa97a857786295f6bca40a6cab3d3feecb (diff)
One has to create the path and filename in order to copy a file there. (issue #8278 reported by davebath)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@47146 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_voicemail.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index a9c7537eb..e6efb09a9 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -2544,12 +2544,14 @@ static int copy_message(struct ast_channel *chan, struct ast_vm_user *vmu, int i
make_dir(fromdir, sizeof(fromdir), vmu->context, vmu->mailbox, frombox);
make_file(frompath, sizeof(frompath), fromdir, msgnum);
+ make_dir(todir, sizeof(todir), recip->context, recip->mailbox, frombox);
if (vm_lock_path(todir))
return ERROR_LOCK_PATH;
recipmsgnum = last_message_index(recip, todir) + 1;
if (recipmsgnum < recip->maxmsg) {
+ make_file(topath, sizeof(topath), todir, recipmsgnum);
COPY(fromdir, msgnum, todir, recipmsgnum, recip->mailbox, recip->context, frompath, topath);
} else {
ast_log(LOG_ERROR, "Recipient mailbox %s@%s is full\n", recip->mailbox, recip->context);