Skip to content

Commit

Permalink
Handle non-existent filename extension reliably
Browse files Browse the repository at this point in the history
  • Loading branch information
mattw-nws committed Jun 23, 2023
1 parent ccce9dc commit c261af4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/realizations/catchment/AbstractCLibBmiAdapter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ namespace models {
if (!utils::FileChecker::file_is_readable(bmi_lib_file)) {
//Try alternative extension...
size_t idx = bmi_lib_file.rfind(".");
if(idx == string::npos){
idx = bmi_lib_file.length()-1;
}
std::string alt_bmi_lib_file;
if(bmi_lib_file.length() == 0){
this->init_exception_msg =
Expand Down

0 comments on commit c261af4

Please sign in to comment.