From 6a09d2aa9bb862e08f22dc6dcb8573c1760bdbad Mon Sep 17 00:00:00 2001 From: Patrick Niklaus Date: Thu, 15 Mar 2018 16:11:16 +0000 Subject: [PATCH] Remove file size checks from compability logic --- include/engine/engine.hpp | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/include/engine/engine.hpp b/include/engine/engine.hpp index 4a07e9841..6e49138e2 100644 --- a/include/engine/engine.hpp +++ b/include/engine/engine.hpp @@ -157,13 +157,7 @@ bool Engine::CheckCompatibility(const EngineC } else { - if (!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; + return boost::filesystem::exists(config.storage_config.GetPath(".osrm.hsgr")); } } @@ -196,16 +190,10 @@ bool Engine::CheckCompatibility(const Engine } else { - if (!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.mldgr")) || - !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; + 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.mldgr")) && + boost::filesystem::exists(config.storage_config.GetPath(".osrm.cell_metrics")); } } }