diff options
author | Sergey Yershov <yershov@corp.mail.ru> | 2016-05-16 14:08:27 +0300 |
---|---|---|
committer | Sergey Yershov <yershov@corp.mail.ru> | 2016-05-16 14:21:11 +0300 |
commit | 9806335ed9fe0819edc15bc40632f180327075c0 (patch) | |
tree | 5bfabaccf824af47a8f945310eb44785b51c8bdc /storage | |
parent | 60d31564956b5e32ed1b5fe0504e227f3b9b0a82 (diff) |
[downloader] Set correct status if downloading failed
Diffstat (limited to 'storage')
-rw-r--r-- | storage/storage.cpp | 8 |
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; } |