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*) --- methods/copy.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'methods/copy.cc') diff --git a/methods/copy.cc b/methods/copy.cc index d737e3c33..8dd0bd3f5 100644 --- a/methods/copy.cc +++ b/methods/copy.cc @@ -12,6 +12,8 @@ #include #include #include +#include +#include #include #include @@ -78,7 +80,11 @@ bool CopyMethod::Fetch(FetchItem *Itm) To.OpFail(); return _error->Errno("utime",_("Failed to set modification time")); } - + + Hashes Hash; + FileFd Fd(Res.Filename, FileFd::ReadOnly); + Hash.AddFD(Fd.Fd(), Fd.Size()); + Res.TakeHashes(Hash); URIDone(Res); return true; } -- cgit v1.2.3