Skip to content

Commit

Permalink
Fixed #7294: Allow FB-known macros in replication.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
dyemanov committed Sep 7, 2022
1 parent c126bc8 commit 655a33f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/common/config/config_file.cpp
Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit 655a33f

Please sign in to comment.