diff options
author | David Kalnischkies <david@kalnischkies.de> | 2015-05-12 11:18:17 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2015-05-12 13:29:54 +0200 |
commit | 495b7a615a2d8f485beadf88c6ed298f5bbe50c2 (patch) | |
tree | b921790586315139e106f855abcdad18b6ce4480 /apt-pkg/acquire-item.cc | |
parent | dcbb364fc69e1108b3fea3adb12a7ba83d9af467 (diff) |
implement VerifyFile as all-hashes check
It isn't used much compared to what the methodname suggests, but in the
remaining uses it can't hurt to check more than strictly necessary by
calculating and verifying with all hashes we can compare with rather
than "just" the best known hash.
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 01ce0e650..1090912f5 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -1175,7 +1175,7 @@ void pkgAcqIndexMergeDiffs::Done(string Message,unsigned long long Size,HashStri else if (State == StateApplyDiff) { // see if we really got the expected file - if(ExpectedHashes.usable() && !ExpectedHashes.VerifyFile(DestFile)) + if(ExpectedHashes.usable() && ExpectedHashes != Hashes) { RenameOnError(HashSumMismatch); return; |