Fixes confusing startup behaviour with malformed args, when
an argument accidentally contains a space (e.g. a park-pos or
protocol desc). In this case we treat the parts after the space as an XML config file name. When we can't find this file, we
completely abandon options setup, which causes many downstream
errors.
Change the behaviour so we warn in this case, but carry on with normal startup.
SGPath f(argv[i]);
if (!f.exists()) {
SG_LOG(SG_GENERAL, SG_ALERT, "config file not found:" << f.str());
- return;
+ } else {
+ p->propertyFiles.push_back(f);
}
-
- p->propertyFiles.push_back(f);
}
} // of arguments iteration
p->insertGroupMarker(); // command line is one group
}
BOOST_FOREACH(const SGPath& file, p->propertyFiles) {
- if (!file.exists()) {
- SG_LOG(SG_GENERAL, SG_ALERT, "config file not found:" << file.str());
- continue;
- }
-
SG_LOG(SG_GENERAL, SG_INFO,
"Reading command-line property file " << file.str());
readProperties(file.str(), globals->get_props());