[core] return actual downloaded size of files that InDownloading state

This commit is contained in:
ExMix 2014-10-14 16:59:44 +03:00 committed by Alex Zolotarev
parent 3fcc26ea6a
commit 87b2959ebb

View file

@ -204,9 +204,13 @@ namespace storage
return CountryByIndex(index).GetFile().GetFileWithoutExt();
}
LocalAndRemoteSizeT Storage::CountrySizeInBytes(const TIndex & index, TMapOptions opt) const
LocalAndRemoteSizeT Storage::CountrySizeInBytes(TIndex const & index, TMapOptions opt) const
{
return QueuedCountry(*this, index, opt).GetFullSize();
LocalAndRemoteSizeT sizes = QueuedCountry(*this, index, opt).GetFullSize();
if (m_request != nullptr && m_queue.front().GetIndex() == index)
sizes.first = m_request->Progress().first + m_countryProgress.first;
return sizes;
}
TStatus Storage::CountryStatus(TIndex const & index) const