class FileMethod : public pkgAcqMethod
{
- virtual bool Fetch(FetchItem *Itm);
+ virtual bool Fetch(FetchItem *Itm) APT_OVERRIDE;
public:
{
HashStringList const hsl = Itm->ExpectedHashes;
if (Itm->ExpectedHashes.VerifyFile(File))
+ {
+ Res.Filename = Itm->DestFile;
Res.IMSHit = true;
+ }
}
}
}
if (filesize != 0 && filesize == Res.Size)
Res.IMSHit = true;
}
+
+ Hashes Hash(Itm->ExpectedHashes);
+ FileFd Fd(File, FileFd::ReadOnly);
+ Hash.AddFD(Fd);
+ Res.TakeHashes(Hash);
}
+ if (Res.IMSHit == false)
+ URIStart(Res);
// See if the uncompressed file exists and reuse it
FetchResult AltRes;
}
}
- if (Res.Filename.empty() == false)
- {
- Hashes Hash(Itm->ExpectedHashes);
- FileFd Fd(Res.Filename, FileFd::ReadOnly);
- Hash.AddFD(Fd);
- Res.TakeHashes(Hash);
- }
-
if (AltRes.Filename.empty() == false)
URIDone(Res,&AltRes);
else if (Res.Filename.empty() == false)