]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/acquire-item.cc
tests: reenable basic auth test and add @ in username
[apt.git] / apt-pkg / acquire-item.cc
index 717751a6e0f39ed9fe3b003ca528f1d34d5b4b59..2180a5a41b118def9aaa9081a351a8f76cdad34d 100644 (file)
@@ -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;