Fix that relative paths do not work with include_zones

fixes #10828
This commit is contained in:
Michael Friedrich 2015-12-11 16:58:43 +01:00
parent 138d416ee2
commit e5ca19b17f
1 changed files with 5 additions and 2 deletions

View File

@ -212,14 +212,17 @@ Expression *ConfigCompiler::HandleIncludeZones(const String& relativeBase, const
const String& path, const String& pattern, const String& package, const DebugInfo&)
{
String ppath;
String newRelativeBase = relativeBase;
if (path.GetLength() > 0 && path[0] == '/')
ppath = path;
else
else {
ppath = relativeBase + "/" + path;
newRelativeBase = ".";
}
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);
}