Skip to content

Commit

Permalink
copying rules file(s) instead of writing new one
Browse files Browse the repository at this point in the history
  • Loading branch information
drbergman committed Nov 21, 2024
1 parent 2aa43bf commit 9820c77
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions core/PhysiCell_rules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1933,6 +1933,8 @@ void parse_rules_from_pugixml( void )

if( done == false )
{ std::cout << "\tWarning: Ruleset had unknown format (" << format << "). Skipping!" << std::endl; }
else
{ copy_file_to_output( input_filename ); }

}
else
Expand Down Expand Up @@ -2368,11 +2370,6 @@ void setup_cell_rules( void )
display_behavior_dictionary( dict_of ); // done
dict_of.close();

// save rules (v1)
std::string rules_file = PhysiCell_settings.folder + "/cell_rules.csv";
export_rules_csv_v3( rules_file );


return;
}

Expand Down
2 changes: 1 addition & 1 deletion core/PhysiCell_utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ void copy_file_to_output(std::string filename)
char copy_command[1024];
sprintf(copy_command, "cp %s %s", filename.c_str(), output_filename.c_str());
std::cout << "Copy command: " << copy_command << std::endl;
system(copy_command);
(void)system(copy_command); // make it explicit that we are ignoring the return value
}

};

0 comments on commit 9820c77

Please sign in to comment.