[transit] Check directory with transit json existence.

This commit is contained in:
Olga Khlopkova 2020-10-26 10:09:30 +03:00 committed by Maksim Andrianov
parent 4076e3cc0e
commit 5f8fd1f6f1

View file

@ -171,8 +171,12 @@ EdgeIdToFeatureId BuildTransit(std::string const & mwmDir, CountryId const & cou
OsmIdToFeatureIdsMap mapping;
FillOsmIdToFeatureIdsMap(osmIdToFeatureIdsPath, mapping);
std::string const transitPath = base::JoinPath(transitDir, countryId);
if (!Platform::IsFileExistsByFullPath(transitPath))
return {};
TransitData data;
DeserializeFromJson(mapping, base::JoinPath(transitDir, countryId), data);
DeserializeFromJson(mapping, transitPath, data);
// Transit section can be empty.
if (data.IsEmpty())