From db0e8c676ecfa58d0c2da1088bbee354b91e732e 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 9c0916f0e..d8e606425 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.40.0