mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-24 21:15:58 +00:00
Ignore empty CONFIG_DIR for validators file (RIPD-1221)
This commit is contained in:
@@ -440,7 +440,7 @@ void Config::loadFromString (std::string const& fileContents)
|
||||
Throw<std::runtime_error> (
|
||||
"Invalid path specified in [" SECTION_VALIDATORS_FILE "]");
|
||||
|
||||
if (!validatorsFile.is_absolute())
|
||||
if (!validatorsFile.is_absolute() && !CONFIG_DIR.empty())
|
||||
validatorsFile = CONFIG_DIR / validatorsFile;
|
||||
|
||||
if (!boost::filesystem::exists (validatorsFile))
|
||||
@@ -454,7 +454,7 @@ void Config::loadFromString (std::string const& fileContents)
|
||||
"Invalid file specified in [" SECTION_VALIDATORS_FILE "]: " +
|
||||
validatorsFile.string());
|
||||
}
|
||||
else
|
||||
else if (!CONFIG_DIR.empty())
|
||||
{
|
||||
validatorsFile = CONFIG_DIR / validatorsFileName;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user