- // 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);
+ Hashes Hash(Itm->ExpectedHashes);
+ FileFd Fd(Res.Filename, FileFd::ReadOnly, FileFd::Extension);