From 1b6c76598aa29d18b75389d4364cbb69625f9293 Mon Sep 17 00:00:00 2001 From: Sergey Yershov Date: Mon, 11 Apr 2016 13:04:43 +0300 Subject: [PATCH] [downloader] Fix progress calculation while getting servers list --- storage/storage.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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);