int res;
if ((res = ast_mkdir(dir, 01777))) {
ast_log(AST_LOG_WARNING, "ast_mkdir '%s' failed: %s\n", dir, strerror(res));
- return snprintf(dest, len, "%s/%smsg%04d", dir, prefix, num);
+ return snprintf(dest, len, "%s/%s%04d", dir, prefix, num);
}
- return snprintf(dest, len, "%s/%smsg%04d", dir, prefix, num);
+ return snprintf(dest, len, "%s/%s%04d", dir, prefix, num);
}
static void vm_imap_delete(int msgnum, struct vm_state *vms)
"Please do not delete this message, lest your greeting vanish with it." ENDL ENDL, date);
}
- if (attach_user_voicemail) {
+ if (imap || attach_user_voicemail) {
if (!ast_strlen_zero(attach2)) {
snprintf(filename, sizeof(filename), "msgintro%04d.%s", msgnum, format);
ast_debug(5, "creating attachment filename %s\n", filename);
mail_fetchstructure(vms->mailstream, vms->msgArray[vms->curmsg], &body);
/* should not assume "fmt" here! */
save_body(body, vms, "2", fmt, vms->fn);
- save_body(body, vms, "2", fmt, vms->fn);
/* second attachment would be body if intro, otherwise null
* two_part will be set to 0 if there are two parts, otherwise -1 */