mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-25 12:35:29 -04:00
Co-authored-by: Patrick Shriwise <pshriwise@gmail.com> Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
parent
b0732cb6b3
commit
e33e66aa88
2 changed files with 29 additions and 1 deletions
|
|
@ -315,6 +315,11 @@ void Plot::set_output_path(pugi::xml_node plot_node)
|
|||
} else {
|
||||
filename = fmt::format("plot_{}", id());
|
||||
}
|
||||
const std::string dir_if_present =
|
||||
filename.substr(0, filename.find_last_of("/") + 1);
|
||||
if (dir_if_present.size() > 0 && !dir_exists(dir_if_present)) {
|
||||
fatal_error(fmt::format("Directory '{}' does not exist!", dir_if_present));
|
||||
}
|
||||
// add appropriate file extension to name
|
||||
switch (type_) {
|
||||
case PlotType::slice:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue