[new downloader] Filter nodes being deleted for calling update status callback

This commit is contained in:
Sergey Yershov 2016-03-17 16:16:24 +03:00
parent b2dab33f9a
commit f6e191cbce

View file

@ -1220,7 +1220,8 @@ void Storage::DeleteNode(TCountryId const & countryId)
auto deleteAction = [this](TCountryTreeNode const & descendantNode)
{
if (descendantNode.ChildrenCount() == 0)
bool onDisk = m_localFiles.find(descendantNode.Value().Name()) != m_localFiles.end();
if (descendantNode.ChildrenCount() == 0 && onDisk)
this->DeleteCountry(descendantNode.Value().Name(), MapOptions::MapWithCarRouting);
};
node->ForEachInSubtree(deleteAction);