Implements #822 (partially)

This commit is contained in:
Dennis Luxen 2013-12-09 14:20:35 -05:00
parent ba6641ed9a
commit fdfe0ce63d

View File

@ -238,6 +238,8 @@ inline bool GenerateServerProgramOptions(
!boost::filesystem::is_regular_file(path_iterator->second)
) {
path_iterator->second = base_string + ".hsgr";
} else {
throw OSRMException(base_string + ".hsgr not found");
}
path_iterator = paths.find("nodesdata");
@ -246,38 +248,52 @@ inline bool GenerateServerProgramOptions(
!boost::filesystem::is_regular_file(path_iterator->second)
) {
path_iterator->second = base_string + ".nodes";
} else {
throw OSRMException(base_string + ".nodes not found");
}
path_iterator = paths.find("edgesdata");
if(
path_iterator != paths.end() &&
!boost::filesystem::is_regular_file(path_iterator->second)
) {
path_iterator->second = base_string + ".edges";
} else {
throw OSRMException(base_string + ".edges not found");
}
path_iterator = paths.find("ramindex");
if(
path_iterator != paths.end() &&
!boost::filesystem::is_regular_file(path_iterator->second)
) {
path_iterator->second = base_string + ".ramIndex";
} else {
throw OSRMException(base_string + ".ramIndex not found");
}
path_iterator = paths.find("fileindex");
if(
path_iterator != paths.end() &&
!boost::filesystem::is_regular_file(path_iterator->second)
) {
path_iterator->second = base_string + ".fileIndex";
} else {
throw OSRMException(base_string + ".fileIndex not found");
}
path_iterator = paths.find("namesdata");
if(
path_iterator != paths.end() &&
!boost::filesystem::is_regular_file(path_iterator->second)
) {
path_iterator->second = base_string + ".names";
} else {
throw OSRMException(base_string + ".namesIndex not found");
}
path_iterator = paths.find("timestamp");