changeset 310:a6df6ffc3ff5

add sent_date to .msg output format
author Carl Byington <carl@five-ten-sg.com>
date Thu, 06 May 2010 13:17:52 -0700
parents 4fd5197aacc2
children 0c42a22f88fc
files src/msg.cpp src/readpst.c
diffstat 2 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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);
--- 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);