diff --git a/indexer/index.cpp b/indexer/index.cpp index 901db047bc..e9b5524dbb 100644 --- a/indexer/index.cpp +++ b/indexer/index.cpp @@ -71,7 +71,7 @@ unique_ptr Index::CreateValue(MwmInfo & info) const { search::RankTableBuilder::CreateIfNotExists(localFile); } - catch (Reader::OpenException const & e) + catch (RootException const & e) { LOG(LWARNING, ("Can't create rank table for:", localFile, ":", e.Msg())); } diff --git a/indexer/rank_table.cpp b/indexer/rank_table.cpp index 16077937ae..2c0b89d36a 100644 --- a/indexer/rank_table.cpp +++ b/indexer/rank_table.cpp @@ -7,6 +7,7 @@ #include "indexer/types_skipper.hpp" #include "platform/local_country_file.hpp" +#include "platform/local_country_file_utils.hpp" #include "coding/endianness.hpp" #include "coding/file_container.hpp" @@ -268,11 +269,17 @@ void RankTableBuilder::CalcSearchRanks(FilesContainerR & rcont, vector // static void RankTableBuilder::CreateIfNotExists(platform::LocalCountryFile const & localFile) { - string const mapPath = localFile.GetPath(MapOptions::Map); + string mapPath; unique_ptr table; { - FilesContainerR rcont(mapPath); + ModelReaderPtr reader = platform::GetCountryReader(localFile, MapOptions::Map); + if (!reader.GetPtr()) + return; + + mapPath = reader.GetName(); + + FilesContainerR rcont(reader); if (rcont.IsExist(RANKS_FILE_TAG)) { switch (CheckEndianness(rcont.GetReader(RANKS_FILE_TAG)))