X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/b3d44315ee812ba2d0a99751695b5a4314407ec2..38eedeb77790c106eb35940e3d7835a7e0f0297e:/methods/file.cc diff --git a/methods/file.cc b/methods/file.cc index 3500de9f5..9cdd5bc2d 100644 --- a/methods/file.cc +++ b/methods/file.cc @@ -15,6 +15,8 @@ // Include Files /*{{{*/ #include #include +#include +#include #include #include @@ -75,7 +77,11 @@ bool FileMethod::Fetch(FetchItem *Itm) if (Res.Filename.empty() == true) return _error->Error(_("File not found")); - + + Hashes Hash; + FileFd Fd(Res.Filename, FileFd::ReadOnly); + Hash.AddFD(Fd.Fd(), Fd.Size()); + Res.TakeHashes(Hash); URIDone(Res); return true; }