comparison src/msg.cpp @ 331:c5e7f13d2836

.msg files should use only one of short or long filename fields
author Carl Byington <carl@five-ten-sg.com>
date Thu, 25 Jul 2013 11:12:57 -0700
parents 3e6cdd543857
children 1c458f13d1d3
comparison
equal deleted inserted replaced
330:93a2d4b162e4 331:c5e7f13d2836
379 int_property(prop_list, 0x370B0003, 0x7, a->position); // PR_RENDERING_POSITION 379 int_property(prop_list, 0x370B0003, 0x7, a->position); // PR_RENDERING_POSITION
380 int_property(prop_list, 0x37100003, 0x6, a->sequence); // PR_ATTACH_MIME_SEQUENCE 380 int_property(prop_list, 0x37100003, 0x6, a->sequence); // PR_ATTACH_MIME_SEQUENCE
381 GsfOutfile *out = GSF_OUTFILE (output); 381 GsfOutfile *out = GSF_OUTFILE (output);
382 string_property(out, prop_list, 0x0FF90102, item->record_key); 382 string_property(out, prop_list, 0x0FF90102, item->record_key);
383 string_property(out, prop_list, 0x37010102, fp); 383 string_property(out, prop_list, 0x37010102, fp);
384 string_property(out, prop_list, 0x3704001E, body_charset, a->filename1); 384 if (a->filename2.str) {
385 string_property(out, prop_list, 0x3707001E, body_charset, a->filename2); 385 // have long file name
386 string_property(out, prop_list, 0x3707001E, body_charset, a->filename2);
387 }
388 else if (a->filename1.str) {
389 // have short file name
390 string_property(out, prop_list, 0x3704001E, body_charset, a->filename1);
391 }
392 else {
393 // make up a name
394 const char *n = "inline";
395 string_property(out, prop_list, 0x3704001E, n, strlen(n));
396 }
386 string_property(out, prop_list, 0x370E001E, body_charset, a->mimetype); 397 string_property(out, prop_list, 0x370E001E, body_charset, a->mimetype);
387 write_properties(out, prop_list, (const guint8*)&top_head, 8); // convenient 8 bytes of reserved zeros 398 write_properties(out, prop_list, (const guint8*)&top_head, 8); // convenient 8 bytes of reserved zeros
388 gsf_output_close(output); 399 gsf_output_close(output);
389 g_object_unref(G_OBJECT(output)); 400 g_object_unref(G_OBJECT(output));
390 top_head.next_attachment++; 401 top_head.next_attachment++;