1
0
Fork 0

Options::setupRoot: Removal of the logic that fg_root is currently not set.

This allows the test suite to preset fg_root using its own bootstrapping logic.
This commit is contained in:
Edward d'Auvergne 2019-11-07 12:11:21 +01:00
parent 4fb149eeb2
commit 0f0361efb8

View file

@ -2933,9 +2933,14 @@ string_list Options::extractOptions() const
void Options::setupRoot(int argc, char **argv)
{
SGPath root;
SGPath root(globals->get_fg_root());
bool usingDefaultRoot = false;
// root has already been set, so skip the fg_root setting and validation.
if (!root.isNull()) {
return;
}
if (isOptionSet("fg-root")) {
root = SGPath::fromLocal8Bit(valueForOption("fg-root").c_str()); // easy!
SG_LOG(SG_GENERAL, SG_INFO, "set from command-line argument: fg_root = " << root );