Remove file size checks from compability logic
This commit is contained in:
parent
15b53de056
commit
6a09d2aa9b
@ -157,13 +157,7 @@ bool Engine<routing_algorithms::ch::Algorithm>::CheckCompatibility(const EngineC
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!boost::filesystem::exists(config.storage_config.GetPath(".osrm.hsgr")))
|
return boost::filesystem::exists(config.storage_config.GetPath(".osrm.hsgr"));
|
||||||
return false;
|
|
||||||
storage::io::FileReader in(config.storage_config.GetPath(".osrm.hsgr"),
|
|
||||||
storage::io::FileReader::VerifyFingerprint);
|
|
||||||
|
|
||||||
auto size = in.GetSize();
|
|
||||||
return size > 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -196,16 +190,10 @@ bool Engine<routing_algorithms::mld::Algorithm>::CheckCompatibility(const Engine
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!boost::filesystem::exists(config.storage_config.GetPath(".osrm.partition")) ||
|
return boost::filesystem::exists(config.storage_config.GetPath(".osrm.partition")) &&
|
||||||
!boost::filesystem::exists(config.storage_config.GetPath(".osrm.cells")) ||
|
boost::filesystem::exists(config.storage_config.GetPath(".osrm.cells")) &&
|
||||||
!boost::filesystem::exists(config.storage_config.GetPath(".osrm.mldgr")) ||
|
boost::filesystem::exists(config.storage_config.GetPath(".osrm.mldgr")) &&
|
||||||
!boost::filesystem::exists(config.storage_config.GetPath(".osrm.cell_metrics")))
|
boost::filesystem::exists(config.storage_config.GetPath(".osrm.cell_metrics"));
|
||||||
return false;
|
|
||||||
storage::io::FileReader in(config.storage_config.GetPath(".osrm.partition"),
|
|
||||||
storage::io::FileReader::VerifyFingerprint);
|
|
||||||
|
|
||||||
auto size = in.GetSize();
|
|
||||||
return size > 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user