Skip to content

Commit

Permalink
Apply suggestion from @pshriwise
Browse files Browse the repository at this point in the history
Co-authored-by: Patrick Shriwise <[email protected]>
  • Loading branch information
paulromano and pshriwise authored Jun 17, 2024
1 parent efacb12 commit fe93b42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ void Plot::set_output_path(pugi::xml_node plot_node)
}
const std::string dir_if_present =
filename.substr(0, filename.find_last_of("/") + 1);
if (!dir_exists(dir_if_present) and dir_if_present.size() > 0) {
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
Expand Down

0 comments on commit fe93b42

Please sign in to comment.