Always use original weights when handling --parse-conditionals-from-now

This commit is contained in:
Siarhei Fedartsou 2022-10-11 23:09:09 +02:00
parent 9fd452f6af
commit db82cecce4

View File

@ -584,12 +584,14 @@ Updater::LoadAndUpdateEdgeExpandedGraph(std::vector<extractor::EdgeBasedEdge> &e
[&] {
// we are going to overwrite this `.turn_weight_penalties` afterwards,
// so here we backup the original turn penalties if we didn't do that yet in order to
// guarantee that subsequent runs of this code will work on top of original weights
// so here we backup the original turn penalties if we didn't do that yet in order
// to guarantee that subsequent runs of this code will work on top of original
// weights
auto path = config.GetPath(".osrm.turn_weight_penalties").string() + ".original";
if (!boost::filesystem::exists(path))
{
boost::filesystem::copy_file(config.GetPath(".osrm.turn_weight_penalties"), path);
boost::filesystem::copy_file(config.GetPath(".osrm.turn_weight_penalties"),
path);
}
extractor::files::readTurnWeightPenalty(path, turn_weight_penalties);
},