From 8b50157eff454be81a3d7b7ba657e86563977c5d Mon Sep 17 00:00:00 2001 From: Daivik Karbhari <114691318+User-DK@users.noreply.github.com> Date: Fri, 19 Jul 2024 18:53:40 +0530 Subject: [PATCH] ENH: Update main.cpp This update ensures that there are no inconsistencies when the ouput directory has already been build then it just doesn't appends but first removes and then writes to the output directory. Tests Passed: Yes --- src/main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.cpp b/src/main.cpp index ac57310..4d01435 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -44,6 +44,7 @@ int main( int argc, char * argv[] ) fmt::print( "Using input file: {}\n", config_file_path.string() ); fmt::print( "Output directory path set to: {}\n", output_dir_path.string() ); + fs::remove_all(output_dir_path);// Remove any existing output directory fs::create_directories( output_dir_path ); // Create the output directory auto simulation_options = Seldon::Config::parse_config_file( config_file_path.string() );