diff options
author | David Kalnischkies <david@kalnischkies.de> | 2014-11-05 18:04:29 +0100 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2014-11-08 14:26:00 +0100 |
commit | c355ea30383486e74635cd0248d3b53ed9759c39 (patch) | |
tree | 5d64fa7729e2c87745c0d381ae31cb08052b08f4 /apt-pkg/acquire-item.cc | |
parent | 6628009d8d4458b8ed1c1ba42ee641549c948844 (diff) |
reenable patchsize limit option for pdiffs
One word: "doh!" Commit f6d4ab9ad8a2cfe52737ab620dd252cf8ceec43d
disabled the check to prevent apt from downloading bigger patches
than the index it tries to patch. Happens rarly of course, but still.
Detected by scan-build complaining about a dead assignment.
To make up for the mistake a test is included as well.
Diffstat (limited to 'apt-pkg/acquire-item.cc')
-rw-r--r-- | apt-pkg/acquire-item.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 605ca7ae4..e0aef5874 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -619,7 +619,7 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile) /*{{{*/ cur != available_patches.end(); ++cur) patchesSize += cur->patch_size; unsigned long long const sizeLimit = ServerSize * _config->FindI("Acquire::PDiffs::SizeLimit", 100); - if (false && sizeLimit > 0 && (sizeLimit/100) < patchesSize) + if (sizeLimit > 0 && (sizeLimit/100) < patchesSize) { if (Debug) std::clog << "Need " << patchesSize << " bytes (Limit is " << sizeLimit/100 |