Skip to content

Commit

Permalink
[transit] Check directory with transit json existence.
Browse files Browse the repository at this point in the history
  • Loading branch information
mesozoic-drones authored and maksimandrianov committed Oct 29, 2020
1 parent 4076e3c commit 5f8fd1f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion generator/transit_generator_experimental.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 5f8fd1f

Please sign in to comment.