File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 11use thiserror:: Error ;
2- use log:: { debug, warn} ;
2+ use log:: { debug, warn, error } ;
33use serde:: { Serialize , Deserialize } ;
44use std:: path:: { Path , PathBuf } ;
55use std:: fs:: File ;
@@ -224,6 +224,12 @@ fn aggregate_hwpc(
224224 let ( output_parent, output_basename) = ( raw_results_dir_path. parent ( ) . unwrap ( ) , raw_results_dir_path. file_name ( ) . unwrap ( ) ) ;
225225 let output_path = & format ! ( "{}/{}.csv" , output_parent. to_str( ) . unwrap( ) , output_basename. to_str( ) . unwrap( ) ) ;
226226
227+ if Path :: new ( output_path) . exists ( ) {
228+ match fs:: remove_file ( output_path) {
229+ Ok ( _) => debug ! ( "File '{}' was deleted successfully." , output_path) ,
230+ Err ( e) => error ! ( "Failed to delete file '{}': {}" , output_path, e) ,
231+ }
232+ }
227233
228234 let mut raw_results_subdirs = Vec :: new ( ) ;
229235
You can’t perform that action at this time.
0 commit comments