diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ChangeLog.ja | 5 | ||||
-rw-r--r-- | src/compose.c | 16 |
3 files changed, 21 insertions, 5 deletions
@@ -1,5 +1,10 @@ 2005-12-26 + * src/compose.c: compose_attach_parts(): don't traverse inside + message/rfc822 to avoid duplicated attachments. + +2005-12-26 + * src/compose.c: only add modified flag when files are manually attached. diff --git a/ChangeLog.ja b/ChangeLog.ja index 3698fc79..6e55c168 100644 --- a/ChangeLog.ja +++ b/ChangeLog.ja @@ -1,5 +1,10 @@ 2005-12-26 + * src/compose.c: compose_attach_parts(): 重複して添付するのを防ぐ + ため、 message/rfc822 内を辿らないようにした。 + +2005-12-26 + * src/compose.c: ファイルが手動で添付された場合のみ修正済みフラグを 追加するようにした。 diff --git a/src/compose.c b/src/compose.c index 7b463bb3..f430f2ea 100644 --- a/src/compose.c +++ b/src/compose.c @@ -1980,19 +1980,19 @@ static void compose_attach_parts(Compose *compose, MsgInfo *msginfo) infile = procmsg_get_message_file_path(msginfo); - for (child = mimeinfo; child != NULL; - child = procmime_mimeinfo_next(child)) { + child = mimeinfo; + while (child != NULL) { if (child->children || child->mime_type == MIME_MULTIPART) - continue; + goto next; if (child->mime_type != MIME_MESSAGE_RFC822 && !child->filename && !child->name) - continue; + goto next; outfile = procmime_get_tmp_file_name(child); if (procmime_get_part(outfile, infile, child) < 0) { g_warning(_("Can't get the part of multipart message.")); g_free(outfile); - continue; + goto next; } compose_attach_append @@ -2001,6 +2001,12 @@ static void compose_attach_parts(Compose *compose, MsgInfo *msginfo) child->content_type); g_free(outfile); + +next: + if (child->mime_type == MIME_MESSAGE_RFC822) + child = child->next; + else + child = procmime_mimeinfo_next(child); } g_free(infile); |