-void CopyMethod::CalculateHashes(FetchResult &Res)
-{
- // For gzip indexes we need to look inside the gzip for the hash
- // We can not use the extension here as its not used in partial
- // on a IMS hit
- FileFd::OpenMode OpenMode = FileFd::ReadOnly;
- if (_config->FindB("Acquire::GzipIndexes", false) == true)
- OpenMode = FileFd::ReadOnlyGzip;
-
- Hashes Hash;
- FileFd Fd(Res.Filename, OpenMode);
- Hash.AddFD(Fd);
- Res.TakeHashes(Hash);
-}