Mercurial > libpst
diff src/dumpblocks.c @ 164:ab384fed78c5
Compensate for iconv conversion to utf-7 that produces strings that are not null terminated.
Don't produce empty attachment files in separate mode.
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Mon, 16 Mar 2009 18:31:39 -0700 |
parents | fc11b1d1ad34 |
children | 6954d315aaa8 |
line wrap: on
line diff
--- a/src/dumpblocks.c Mon Mar 16 12:43:31 2009 -0700 +++ b/src/dumpblocks.c Mon Mar 16 18:31:39 2009 -0700 @@ -56,16 +56,16 @@ printf("Saving blocks\n"); while (ptr != NULL) { /* if (pstfile.encryption == PST_ENC) { - c = pst_ff_getIDblock_dec(&pstfile, ptr->id, buf); + c = pst_ff_getIDblock_dec(&pstfile, ptr->i_id, buf); } else { */ - if ((ptr->id & 0x02) == 0 && pstfile.encryption == PST_ENC) { - c = pst_ff_getIDblock_dec(&pstfile, ptr->id, &buf); + if ((ptr->i_id & 0x02) == 0 && pstfile.encryption == PST_ENC) { + c = pst_ff_getIDblock_dec(&pstfile, ptr->i_id, &buf); } else { - c = pst_ff_getIDblock(&pstfile, ptr->id, &buf); + c = pst_ff_getIDblock(&pstfile, ptr->i_id, &buf); } if (c > 0) { - snprintf(outname, OUT_BUF, "%#"PRIx64, ptr->id); + snprintf(outname, OUT_BUF, "%#"PRIx64, ptr->i_id); if ((fp = fopen(outname, "wb")) == NULL) { printf("Failed to open file %s\n", outname); continue; @@ -73,7 +73,7 @@ pst_fwrite(buf, 1, c, fp); fclose(fp); } else { - printf("Failed to read block id %#"PRIx64"\n", ptr->id); + printf("Failed to read block i_id %#"PRIx64"\n", ptr->i_id); } ptr = ptr->next; }