Use GetPath with file names over accessing member variables
This commit is contained in:
committed by
Daniel J. H
parent
e208485c17
commit
d9e8caf369
@@ -72,7 +72,7 @@ parseArguments(int argc, char *argv[], customizer::CustomizationConfig &customiz
|
||||
boost::program_options::options_description hidden_options("Hidden options");
|
||||
hidden_options.add_options()(
|
||||
"input,i",
|
||||
boost::program_options::value<boost::filesystem::path>(&customization_config.osrm_path),
|
||||
boost::program_options::value<boost::filesystem::path>(&customization_config.base_path),
|
||||
"Input file in .osrm format");
|
||||
|
||||
// positional option
|
||||
@@ -145,7 +145,7 @@ int main(int argc, char *argv[]) try
|
||||
}
|
||||
|
||||
// set the default in/output names
|
||||
customization_config.UseDefaultOutputNames();
|
||||
customization_config.UseDefaultOutputNames(customization_config.base_path);
|
||||
|
||||
if (1 > customization_config.requested_num_threads)
|
||||
{
|
||||
@@ -153,9 +153,9 @@ int main(int argc, char *argv[]) try
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if (!boost::filesystem::is_regular_file(customization_config.osrm_path))
|
||||
if (!boost::filesystem::is_regular_file(customization_config.GetPath(".osrm")))
|
||||
{
|
||||
util::Log(logERROR) << "Input file " << customization_config.osrm_path.string()
|
||||
util::Log(logERROR) << "Input file " << customization_config.GetPath(".osrm").string()
|
||||
<< " not found!";
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user