From 95f45727964767f11534eb5347af3fc3a8a6e020 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 8 Aug 2007 19:28:43 +0200 Subject: * apt-pkg/acquire-worker.cc: - only pass a hash if we actually got one from the method * methods/copy.cc: - take hashes here too (*sigh*) --- apt-pkg/acquire-worker.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'apt-pkg/acquire-worker.cc') diff --git a/apt-pkg/acquire-worker.cc b/apt-pkg/acquire-worker.cc index 460f59961..739c9e32c 100644 --- a/apt-pkg/acquire-worker.cc +++ b/apt-pkg/acquire-worker.cc @@ -273,7 +273,9 @@ bool pkgAcquire::Worker::RunMessages() if(!expectedHash.empty()) { string hashTag = expectedHash.HashType()+"-Hash"; - RecivedHash = expectedHash.HashType() + ":" + LookupTag(Message, hashTag.c_str()); + string hashSum = LookupTag(Message, hashTag.c_str()); + if(!hashSum.empty()) + RecivedHash = expectedHash.HashType() + ":" + hashSum; if(_config->FindB("Debug::pkgAcquire::Auth", false) == true) { clog << "201 URI Done: " << Owner->DescURI() << endl -- cgit v1.2.3