Skip to content

Commit

Permalink
Merge pull request martijnvanbrummelen#507 from PartialVolume/Fix_mes…
Browse files Browse the repository at this point in the history
…sage_Creating_PDF_report_in

The message that logs which directory the nwipe PDF certificate is being saved, was being printed multiple times in the middle of the erasure summary table.

This was corrected so that it only prints once at the end of the table
  • Loading branch information
PartialVolume authored Oct 23, 2023
2 parents 603716e + 8ce7b07 commit 95021ef
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/logging.c
Original file line number Diff line number Diff line change
Expand Up @@ -893,8 +893,6 @@ void nwipe_log_summary( nwipe_context_t** ptr, int nwipe_selected )
/* Create the PDF report/certificate */
if( strcmp( nwipe_options.PDFreportpath, "noPDF" ) != 0 )
{
nwipe_log( NWIPE_LOG_NOTIMESTAMP, "Creating PDF report in %s\n", nwipe_options.PDFreportpath );
printf( "Creating PDF report in %s\n", nwipe_options.PDFreportpath );
create_pdf( c[i] );
}
}
Expand Down Expand Up @@ -946,4 +944,12 @@ void nwipe_log_summary( nwipe_context_t** ptr, int nwipe_selected )
nwipe_log( NWIPE_LOG_NOTIMESTAMP,
"********************************************************************************" );
nwipe_log( NWIPE_LOG_NOTIMESTAMP, "" );

/* Log information regarding where the PDF certificate is saved but log after the summary table so
* this information is only printed once.
*/
if( strcmp( nwipe_options.PDFreportpath, "noPDF" ) != 0 )
{
nwipe_log( NWIPE_LOG_NOTIMESTAMP, "Creating PDF report in %s\n", nwipe_options.PDFreportpath );
}
}

0 comments on commit 95021ef

Please sign in to comment.