| 769 | } |
| 770 | |
| 771 | Status Storage::CountryStatusEx(CountryId const & countryId) const |
| 772 | { |
| 773 | auto const status = CountryStatus(countryId); |
| 774 | if (status != Status::UnknownError) |
| 775 | return status; |
| 776 | |
| 777 | auto localFile = GetLatestLocalFile(countryId); |
| 778 | if (!localFile || !(localFile->OnDisk(MapFileType::Map) || localFile->IsInBundle())) |
| 779 | return Status::NotDownloaded; |
| 780 | |
| 781 | auto const & countryFile = GetCountryFile(countryId); |
| 782 | if (GetRemoteSize(countryFile) == 0) |
| 783 | return Status::UnknownError; |
| 784 | |
| 785 | if (localFile->GetVersion() != m_currentVersion) |
| 786 | return Status::OnDiskOutOfDate; |
| 787 | return Status::OnDisk; |
| 788 | } |
| 789 | |
| 790 | void Storage::SaveDownloadQueue() |
| 791 | { |