summaryrefslogtreecommitdiff
path: root/methods
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2021-04-13 15:22:37 +0000
committerJulian Andres Klode <jak@debian.org>2021-04-13 15:22:37 +0000
commit734c6ce0d3250d0b35cf3d0dd54e8baae3774fa8 (patch)
treecea11605e9ddbe8e5763d8f2e822d9c764dbd363 /methods
parent7a3b13832bf60d8d086c07ea96aa656ac9439f66 (diff)
parent1412cf51403286e9c040f9f86fd4d8306e62aff2 (diff)
Merge branch 'pu/unsized-packages' into 'main'
Fix downloads of unsized files that are largest in pipeline See merge request apt-team/apt!161
Diffstat (limited to 'methods')
-rw-r--r--methods/basehttp.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/methods/basehttp.cc b/methods/basehttp.cc
index 3786e2e6c..f2c4156e1 100644
--- a/methods/basehttp.cc
+++ b/methods/basehttp.cc
@@ -882,7 +882,11 @@ unsigned long long BaseHttpMethod::FindMaximumObjectSizeInQueue() const /*{{{*/
{
unsigned long long MaxSizeInQueue = 0;
for (FetchItem *I = Queue; I != 0 && I != QueueBack; I = I->Next)
+ {
+ if (I->MaximumSize == 0)
+ return 0;
MaxSizeInQueue = std::max(MaxSizeInQueue, I->MaximumSize);
+ }
return MaxSizeInQueue;
}
/*}}}*/