From 59d979c61eb05c72dff9b5c00e67d54d25408f97 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Fri, 30 Aug 2013 14:02:47 +0200 Subject: [PATCH] config: Don't throw exception when file pattern doesn't match any files. --- lib/config/configcompiler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/config/configcompiler.cpp b/lib/config/configcompiler.cpp index 33036b55e..42c2c5156 100644 --- a/lib/config/configcompiler.cpp +++ b/lib/config/configcompiler.cpp @@ -198,9 +198,9 @@ void ConfigCompiler::HandleFileInclude(const String& include, bool search, std::vector 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())); } } -- 2.50.1