# HG changeset patch # User Carl Byington # Date 1273177072 25200 # Node ID a6df6ffc3ff506876961a000a882ae6265b56f0b # Parent 4fd5197aacc27395e648fa2901139e747df819af add sent_date to .msg output format diff -r 4fd5197aacc2 -r a6df6ffc3ff5 src/msg.cpp --- a/src/msg.cpp Mon Dec 14 22:19:50 2009 -0800 +++ b/src/msg.cpp Thu May 06 13:17:52 2010 -0700 @@ -117,6 +117,14 @@ } +static void string_property(GsfOutfile *out, property_list &prop, uint32_t tag, const char* charset, FILETIME *contents); +static void string_property(GsfOutfile *out, property_list &prop, uint32_t tag, const char* charset, FILETIME *contents) { + if (contents) { + string_property(out, prop, tag, (char *)contents, sizeof(FILETIME)); + } +} + + static void string_property(GsfOutfile *out, property_list &prop, uint32_t tag, const char* charset, pst_string &contents); static void string_property(GsfOutfile *out, property_list &prop, uint32_t tag, const char* charset, pst_string &contents) { if (contents.str) { @@ -235,6 +243,7 @@ GsfOutfile *out = GSF_OUTFILE (output); string_property(out, prop_list, 0x001A001E, item->ascii_type); string_property(out, prop_list, 0x0037001E, body_charset, item->subject); + string_property(out, prop_list, 0x00390040, email.sent_date); strin0_property(out, prop_list, 0x003B0102, body_charset, email.outlook_sender); string_property(out, prop_list, 0x003D001E, string("")); string_property(out, prop_list, 0x0040001E, body_charset, email.outlook_received_name1); diff -r 4fd5197aacc2 -r a6df6ffc3ff5 src/readpst.c --- a/src/readpst.c Mon Dec 14 22:19:50 2009 -0800 +++ b/src/readpst.c Thu May 06 13:17:52 2010 -0700 @@ -888,13 +888,12 @@ int mk_separate_file(struct file_ll *f, char *extension, int openit) { - const int name_offset = 1; DEBUG_ENT("mk_separate_file"); DEBUG_INFO(("opening next file to save email\n")); if (f->item_count > 999999999) { // bigger than nine 9's DIE(("mk_separate_file: The number of emails in this folder has become too high to handle\n")); } - sprintf(f->name, SEP_MAIL_FILE_TEMPLATE, f->item_count + name_offset, extension); + sprintf(f->name, SEP_MAIL_FILE_TEMPLATE, f->item_count, extension); if (f->output) fclose(f->output); f->output = NULL; check_filename(f->name);