From 655a33f151708dcfb07f4415fe87d29acb76557e Mon Sep 17 00:00:00 2001 From: Dmitry Yemanov Date: Wed, 7 Sep 2022 19:35:08 +0300 Subject: [PATCH] Fixed #7294: Allow FB-known macros in replication.conf --- src/common/config/config_file.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/common/config/config_file.cpp b/src/common/config/config_file.cpp index f61e665e77e..6f7b89b0eed 100644 --- a/src/common/config/config_file.cpp +++ b/src/common/config/config_file.cpp @@ -415,9 +415,6 @@ ConfigFile::LineType ConfigFile::parseLine(const char* fileName, const String& i bool ConfigFile::macroParse(String& value, const char* fileName) const { - if (flags & CUSTOM_MACROS) - return true; - String::size_type subFrom; while ((subFrom = value.find("$(")) != String::npos) @@ -427,10 +424,15 @@ bool ConfigFile::macroParse(String& value, const char* fileName) const { String macro; String m = value.substr(subFrom + 2, subTo - (subFrom + 2)); - if (! translate(fileName, m, macro)) + + if (!translate(fileName, m, macro)) { + if (flags & CUSTOM_MACROS) + continue; + return false; } + ++subTo; // Avoid incorrect slashes in pathnames