diff --git a/routing/osrm_router.cpp b/routing/osrm_router.cpp index 7fea6843cd..bdd1558b1f 100644 --- a/routing/osrm_router.cpp +++ b/routing/osrm_router.cpp @@ -253,6 +253,9 @@ void OsrmRouter::CalculateRouteAsync(ReadyCallback const & callback) case RouteNotFound: LOG(LWARNING, ("Route not found")); break; + case RouteFileNotExist: + LOG(LWARNING, ("There are no routing file")); + break; default: break; @@ -298,6 +301,9 @@ OsrmRouter::ResultCode OsrmRouter::CalculateRouteImpl(m2::PointD const & startPt fName += DATA_FILE_EXTENSION; string const fPath = pl.WritablePathForFile(fName + ROUTING_FILE_EXTENSION); + if (!pl.IsFileExistsByFullPath(fPath)) + return RouteFileNotExist; + if (NeedReload(fPath)) { LOG(LDEBUG, ("Load routing index for file:", fPath)); diff --git a/routing/router.hpp b/routing/router.hpp index 43a57d1899..ff12d8a836 100644 --- a/routing/router.hpp +++ b/routing/router.hpp @@ -19,6 +19,7 @@ public: NoError = 0, Cancelled, InconsistentMWMandRoute, + RouteFileNotExist, StartPointNotFound, EndPointNotFound, PointsInDifferentMWM,