# HG changeset patch # User Carl Byington # Date 1307209967 25200 # Node ID fec37c150982d16f63833465faa3cc7c3a1b363f # Parent cc8ee701f1904c2801da5aba2d2f41b68b2c4385 possible fix for corrupted output forking for separate messages diff -r cc8ee701f190 -r fec37c150982 src/readpst.c --- a/src/readpst.c Fri May 27 11:36:49 2011 -0700 +++ b/src/readpst.c Sat Jun 04 10:52:47 2011 -0700 @@ -330,8 +330,9 @@ DEBUG_INFO(("I have an email type %"PRIi32", but the folder type %"PRIi32" isn't an email folder. Skipping it\n", item->type, ff.type)); } else { + char *extra_mime_headers = NULL; ff.item_count++; - char *extra_mime_headers = NULL; + if (mode == MODE_SEPARATE) mk_separate_file(&ff, (mode_EX) ? ".eml" : ""); if (mode == MODE_SEPARATE) { // process this single email message, possibly forking pid_t parent = getpid(); @@ -339,7 +340,6 @@ if (child == 0) { // we are the child process, or the original parent if no children were available pid_t me = getpid(); - mk_separate_file(&ff, (mode_EX) ? ".eml" : ""); write_normal_email(ff.output, ff.name, item, mode, mode_MH, &pstfile, save_rtf_body, &extra_mime_headers); #ifdef HAVE_FORK #ifdef HAVE_SEMAPHORE_H diff -r cc8ee701f190 -r fec37c150982 xml/libpst.in --- a/xml/libpst.in Fri May 27 11:36:49 2011 -0700 +++ b/xml/libpst.in Sat Jun 04 10:52:47 2011 -0700 @@ -35,7 +35,7 @@ - 2009-09-14 + 2011-05-27 @@ -155,7 +155,9 @@ -j jobs Specifies the maximum number of parallel jobs. Specify 0 to suppress - running parallel jobs. + running parallel jobs. Folders may be processed in parallel. Output + formats that place each mail message in a separate file (-M, -S, -e) + may process the contents of individual folders in parallel. @@ -269,7 +271,7 @@ - 2009-09-14 + 2011-05-27 @@ -364,7 +366,7 @@ - 2009-09-14 + 2011-05-27 @@ -532,7 +534,7 @@ - 2009-09-14 + 2011-05-27 @@ -665,7 +667,7 @@ - 2009-09-14 + 2011-05-27