Mercurial > libpst
diff src/readpst.c @ 246:5a82d41c883d
patches from Kenneth Berland for solaris
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Thu, 06 May 2010 15:28:46 -0700 |
parents | 67b24d6a45d6 |
children | 85d77d7b034b |
line wrap: on
line diff
--- a/src/readpst.c Sat Feb 13 11:28:18 2010 -0800 +++ b/src/readpst.c Thu May 06 15:28:46 2010 -0700 @@ -871,13 +871,12 @@ int mk_separate_file(struct file_ll *f, char *extension) { - 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); @@ -1447,7 +1446,11 @@ // create required header fields that are not already written if (!has_from) { - fprintf(f_output, "From: \"%s\" <%s>\n", item->email->outlook_sender_name.str, sender); + if (item->email->outlook_sender_name.str){ + fprintf(f_output, "From: \"%s\" <%s>\n", item->email->outlook_sender_name.str, sender); + } else { + fprintf(f_output, "From: <%s>\n", sender); + } } if (!has_subject) {