config: Don't throw exception when file pattern doesn't match any files.

This commit is contained in:
Gunnar Beutner 2013-08-30 14:02:47 +02:00
parent 519ce78727
commit 59d979c61e
1 changed files with 2 additions and 2 deletions

View File

@ -198,9 +198,9 @@ void ConfigCompiler::HandleFileInclude(const String& include, bool search,
std::vector<ConfigItem::Ptr> items;
if (!Utility::Glob(includePath, boost::bind(&ConfigCompiler::CompileFile, _1))) {
if (!Utility::Glob(includePath, boost::bind(&ConfigCompiler::CompileFile, _1)) && includePath.FindFirstOf("*?") == String::NPos) {
std::ostringstream msgbuf;
msgbuf << "Include file '" + include + "' does not exist (or no files found for pattern): " << debuginfo;
msgbuf << "Include file '" + include + "' does not exist: " << debuginfo;
BOOST_THROW_EXCEPTION(std::invalid_argument(msgbuf.str()));
}
}