load data from server.ini only iff no parameters are give
This commit is contained in:
parent
175112d97d
commit
a2819d822a
@ -215,8 +215,11 @@ inline bool GenerateServerProgramOptions(
|
|||||||
|
|
||||||
// parse config file
|
// parse config file
|
||||||
ServerPaths::const_iterator path_iterator = paths.find("config");
|
ServerPaths::const_iterator path_iterator = paths.find("config");
|
||||||
if( path_iterator != paths.end() &&
|
if(
|
||||||
boost::filesystem::is_regular_file(path_iterator->second)) {
|
path_iterator != paths.end() &&
|
||||||
|
boost::filesystem::is_regular_file(path_iterator->second) &&
|
||||||
|
!option_variables.count("base")
|
||||||
|
) {
|
||||||
SimpleLogger().Write() <<
|
SimpleLogger().Write() <<
|
||||||
"Reading options from: " << path_iterator->second.string();
|
"Reading options from: " << path_iterator->second.string();
|
||||||
std::string config_str;
|
std::string config_str;
|
||||||
@ -229,8 +232,8 @@ inline bool GenerateServerProgramOptions(
|
|||||||
boost::program_options::notify(option_variables);
|
boost::program_options::notify(option_variables);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!option_variables.count("hsgrdata")) {
|
if( !option_variables.count("hsgrdata") ) {
|
||||||
if(!option_variables.count("base")) {
|
if( !option_variables.count("base") ) {
|
||||||
throw OSRMException("hsgrdata (or base) must be specified");
|
throw OSRMException("hsgrdata (or base) must be specified");
|
||||||
}
|
}
|
||||||
paths["hsgrdata"] = std::string( paths["base"].string()) + ".hsgr";
|
paths["hsgrdata"] = std::string( paths["base"].string()) + ".hsgr";
|
||||||
|
Loading…
Reference in New Issue
Block a user