Skip to content

Commit

Permalink
Added error if cross sections path is a folder (#3115)
Browse files Browse the repository at this point in the history
  • Loading branch information
ybadr16 authored Aug 15, 2024
1 parent 10c511a commit e7bc9ba
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/cross_sections.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,10 @@ void read_ce_cross_sections_xml()
{
// Check if cross_sections.xml exists
const auto& filename = settings::path_cross_sections;
if (dir_exists(filename)) {
fatal_error("OPENMC_CROSS_SECTIONS is set to a directory. "
"It should be set to an XML file.");
}
if (!file_exists(filename)) {
// Could not find cross_sections.xml file
fatal_error("Cross sections XML file '" + filename + "' does not exist.");
Expand Down

0 comments on commit e7bc9ba

Please sign in to comment.