diff options
Diffstat (limited to 'src/configparser.cpp')
| -rw-r--r-- | src/configparser.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/configparser.cpp b/src/configparser.cpp index 418542570..65ee663ae 100644 --- a/src/configparser.cpp +++ b/src/configparser.cpp @@ -402,10 +402,14 @@ void ParseStack::DoInclude(std::shared_ptr<ConfigTag> tag, int flags) { for (const auto& entry : std::filesystem::directory_iterator(includedir)) { - if (!entry.is_regular_file() || !InspIRCd::Match(ConvToStr(entry.path().filename()), "*.conf")) + if (!entry.is_regular_file()) continue; - if (!ParseFile(entry.path().string(), flags, mandatorytag)) + const std::string path = entry.path().string(); + if (!InspIRCd::Match(path, "*.conf")) + continue; + + if (!ParseFile(path, flags, mandatorytag)) throw CoreException("Included"); } } |
