diff --git a/include/realizations/catchment/Formulation_Manager.hpp b/include/realizations/catchment/Formulation_Manager.hpp index 9a1a61ea3a..651b99fdbb 100644 --- a/include/realizations/catchment/Formulation_Manager.hpp +++ b/include/realizations/catchment/Formulation_Manager.hpp @@ -9,8 +9,8 @@ #include #include #include -#include +#include #include #include #include @@ -410,7 +410,7 @@ namespace realization { } // Create a regular expression used to identify proper file names - std::regex pattern(filepattern); + boost::regex pattern(filepattern); // A stream providing the functions necessary for evaluating a directory: // https://www.gnu.org/software/libc/manual/html_node/Opening-a-Directory.html#Opening-a-Directory @@ -463,8 +463,7 @@ namespace realization { if (directory != nullptr) { bool match; while ((entry = readdir(directory))) { - match = std::regex_match(entry->d_name, pattern); - if( match ) { + if (filepattern == entry->d_name || boost::regex_match(entry->d_name, pattern)) { // If the entry is a regular file or symlink AND the name matches the pattern, // we can consider this ready to be interpretted as valid forcing data (even if it isn't) #ifdef _DIRENT_HAVE_D_TYPE