Mercurial > libpst
changeset 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 | 93a2d4b162e4 |
children | 160cf301ad4d |
files | regression/regression-tests.bash src/msg.cpp |
diffstat | 2 files changed, 18 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/regression/regression-tests.bash Wed Jun 12 21:34:35 2013 -0700 +++ b/regression/regression-tests.bash Thu Jul 25 11:12:57 2013 -0700 @@ -66,9 +66,11 @@ ## normal recursive dump char='us-ascii' + acc="-a '.xls,.doc'" + acc='' #char='BIG-5' - echo $val ../src/readpst -a '.xls,.doc' -C $char -j 0 -r -cv -o output$n -d $ba.log $fn - $val ../src/readpst -a '.xls,.doc' -C $char -j 0 -r -cv -o output$n -d $ba.log $fn >$ba.err 2>&1 + echo $val ../src/readpst $acc -C $char -j 0 -r -cv -o output$n -d $ba.log $fn + $val ../src/readpst $acc -C $char -j 0 -r -cv -o output$n -d $ba.log $fn >$ba.err 2>&1 ## separate mode with filename extensions and .msg files #echo $val ../src/readpst $jobs -r -m -D -cv -o output$n -d $ba.log $fn @@ -135,6 +137,7 @@ #$func 28 pstsample.pst # character set issue #$func 29 pstsample2.pst # embedded image in rtf data #$func 30 pstsample3.pst # exports of rtf and html +$func 31 Journal_Archives_08_29_2010.pst [ -n "$val" ] && grep 'lost:' *err | grep -v 'lost: 0 '
--- a/src/msg.cpp Wed Jun 12 21:34:35 2013 -0700 +++ b/src/msg.cpp Thu Jul 25 11:12:57 2013 -0700 @@ -381,8 +381,19 @@ GsfOutfile *out = GSF_OUTFILE (output); string_property(out, prop_list, 0x0FF90102, item->record_key); string_property(out, prop_list, 0x37010102, fp); - string_property(out, prop_list, 0x3704001E, body_charset, a->filename1); - string_property(out, prop_list, 0x3707001E, body_charset, a->filename2); + if (a->filename2.str) { + // have long file name + string_property(out, prop_list, 0x3707001E, body_charset, a->filename2); + } + else if (a->filename1.str) { + // have short file name + string_property(out, prop_list, 0x3704001E, body_charset, a->filename1); + } + else { + // make up a name + const char *n = "inline"; + string_property(out, prop_list, 0x3704001E, n, strlen(n)); + } string_property(out, prop_list, 0x370E001E, body_charset, a->mimetype); write_properties(out, prop_list, (const guint8*)&top_head, 8); // convenient 8 bytes of reserved zeros gsf_output_close(output);