mirror of https://github.com/Icinga/icinga2.git
parent
2bc1d32caa
commit
db0e8c676e
|
@ -212,14 +212,17 @@ Expression *ConfigCompiler::HandleIncludeZones(const String& relativeBase, const
|
||||||
const String& path, const String& pattern, const String& package, const DebugInfo&)
|
const String& path, const String& pattern, const String& package, const DebugInfo&)
|
||||||
{
|
{
|
||||||
String ppath;
|
String ppath;
|
||||||
|
String newRelativeBase = relativeBase;
|
||||||
|
|
||||||
if (path.GetLength() > 0 && path[0] == '/')
|
if (path.GetLength() > 0 && path[0] == '/')
|
||||||
ppath = path;
|
ppath = path;
|
||||||
else
|
else {
|
||||||
ppath = relativeBase + "/" + path;
|
ppath = relativeBase + "/" + path;
|
||||||
|
newRelativeBase = ".";
|
||||||
|
}
|
||||||
|
|
||||||
std::vector<Expression *> expressions;
|
std::vector<Expression *> expressions;
|
||||||
Utility::Glob(ppath + "/*", boost::bind(&ConfigCompiler::HandleIncludeZone, relativeBase, tag, _1, pattern, package, boost::ref(expressions)), GlobDirectory);
|
Utility::Glob(ppath + "/*", boost::bind(&ConfigCompiler::HandleIncludeZone, newRelativeBase, tag, _1, pattern, package, boost::ref(expressions)), GlobDirectory);
|
||||||
return new DictExpression(expressions);
|
return new DictExpression(expressions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue