diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-12-26 06:44:48 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-12-26 06:44:48 +0000 |
commit | 624978fc2ac911e5daac08905a8d6e5c62e53694 (patch) | |
tree | e2a98ce6db76c5aca34d471e3e307478c4669fdb | |
parent | 81e59201385b28d3c6690f48f031d090acc0de31 (diff) |
don't traverse inside message/rfc822 to avoid duplicated attachments.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@863 ee746299-78ed-0310-b773-934348b2243d
-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); |