From e5ca19b17f0613b2ebc20dbe2bfffabb44713d4b Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Fri, 11 Dec 2015 16:58:43 +0100 Subject: [PATCH] Fix that relative paths do not work with include_zones fixes #10828 --- lib/config/configcompiler.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/config/configcompiler.cpp b/lib/config/configcompiler.cpp index 9aed686b3..1bda22670 100644 --- a/lib/config/configcompiler.cpp +++ b/lib/config/configcompiler.cpp @@ -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 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); } -- 2.50.1