diff options
author | Sergey Yershov <yershov@corp.mail.ru> | 2016-04-11 13:04:43 +0300 |
---|---|---|
committer | Sergey Yershov <yershov@corp.mail.ru> | 2016-04-11 13:08:18 +0300 |
commit | 1b6c76598aa29d18b75389d4364cbb69625f9293 (patch) | |
tree | 9c24ae3e977188ac978a8245174d509d32ae51f7 /storage | |
parent | da14a65bbda7a6361107a058278ec9b1c03a8cde (diff) |
[downloader] Fix progress calculation while getting servers list
Diffstat (limited to 'storage')
-rw-r--r-- | storage/storage.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/storage/storage.cpp b/storage/storage.cpp index a98f0321a1..155541fd87 100644 --- a/storage/storage.cpp +++ b/storage/storage.cpp @@ -1333,7 +1333,12 @@ void Storage::GetNodeAttrs(TCountryId const & countryId, NodeAttrs & nodeAttrs) : kInvalidCountryId; MapFilesDownloader::TProgress downloadingMwmProgress(0, 0); if (!m_downloader->IsIdle()) + { downloadingMwmProgress = m_downloader->GetDownloadingProgress(); + // If we don't know estimated file size then we ignore its progress. + if (downloadingMwmProgress.second == -1) + downloadingMwmProgress = {0, 0}; + } TCountriesSet setQueue; GetQueuedCountries(m_queue, setQueue); |