X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/b7a1076f18022cbeb7baf4d82ab8bae0f725a573..28b2efcb190edd97b802ac9055eaf417f141f724:/apt-pkg/acquire-item.cc diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 717751a6e..2180a5a41 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -2610,6 +2610,10 @@ void pkgAcqIndex::Init(string const &URI, string const &URIDesc, DestFile = GetPartialFileNameFromURI(URI); NextCompressionExtension(CurrentCompressionExtension, CompressionExtensions, false); + // store file size of the download to ensure the fetcher gives + // accurate progress reporting + FileSize = GetExpectedHashes().FileSize(); + if (CurrentCompressionExtension == "uncompressed") { Desc.URI = URI;