bugscape 15399 fix by ducarroz r=cavin sr=mscott. fix Body of Multipart/alternative message with attachment not included when forwarded

This commit is contained in:
naving%netscape.com 2002-05-10 03:46:18 +00:00
Родитель 2dff4770f1
Коммит 6f841cdd0d
1 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -47,6 +47,8 @@
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
extern "C" MimeObjectClass mimeMultipartRelatedClass;
#define MIME_SUPERCLASS mimeMultipartClass
MimeDefClass(MimeMultipartAlternative, MimeMultipartAlternativeClass,
mimeMultipartAlternativeClass, &MIME_SUPERCLASS);
@ -315,7 +317,7 @@ MimeMultipartAlternative_display_cached_part(MimeObject *obj)
However, we still have to call decompose_file_init_fn and decompose_file_close_fn
in order to set the correct content-type. But don't call MimePartBufferRead
*/
PRBool multipartChild = mime_typep(obj->parent, (MimeObjectClass *) &mimeMultipartClass);
PRBool multipartRelatedChild = mime_typep(obj->parent,(MimeObjectClass*)&mimeMultipartRelatedClass);
PRBool decomposeFile = obj->options &&
obj->options->decompose_file_p &&
obj->options->decompose_file_init_fn &&
@ -337,7 +339,7 @@ MimeMultipartAlternative_display_cached_part(MimeObject *obj)
if (status < 0) return status;
#ifdef MIME_DRAFTS
if (decomposeFile && !multipartChild)
if (decomposeFile && !multipartRelatedChild)
status = MimePartBufferRead (malt->part_buffer,
obj->options->decompose_file_output_fn,
obj->options->stream_closure);