Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Yershov <yershov@corp.mail.ru>2016-05-16 14:08:27 +0300
committerSergey Yershov <yershov@corp.mail.ru>2016-05-16 14:21:11 +0300
commit9806335ed9fe0819edc15bc40632f180327075c0 (patch)
tree5bfabaccf824af47a8f945310eb44785b51c8bdc /storage
parent60d31564956b5e32ed1b5fe0504e227f3b9b0a82 (diff)
[downloader] Set correct status if downloading failed
Diffstat (limited to 'storage')
-rw-r--r--storage/storage.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/storage/storage.cpp b/storage/storage.cpp
index 79f2b55fea..4a6e889ada 100644
--- a/storage/storage.cpp
+++ b/storage/storage.cpp
@@ -397,6 +397,10 @@ Storage::TLocalFilePtr Storage::GetLatestLocalFile(TCountryId const & countryId)
Status Storage::CountryStatus(TCountryId const & countryId) const
{
+ // Check if this country has failed while downloading.
+ if (m_failedCountries.count(countryId) > 0)
+ return Status::EDownloadFailed;
+
// Check if we already downloading this country or have it in the queue
if (IsCountryInQueue(countryId))
{
@@ -406,10 +410,6 @@ Status Storage::CountryStatus(TCountryId const & countryId) const
return Status::EInQueue;
}
- // Check if this country has failed while downloading.
- if (m_failedCountries.count(countryId) > 0)
- return Status::EDownloadFailed;
-
return Status::EUnknown;
}