void CopyMethod::CalculateHashes(FetchItem const * const Itm, FetchResult &Res)
{
Hashes Hash(Itm->ExpectedHashes);
- FileFd Fd(Res.Filename, FileFd::ReadOnly, FileFd::Extension);
+ FileFd Fd(Res.Filename, FileFd::ReadOnly);
Hash.AddFD(Fd);
Res.TakeHashes(Hash);
}
URIStart(Res);
// just calc the hashes if the source and destination are identical
- if (File == Itm->DestFile)
+ if (File == Itm->DestFile || Itm->DestFile == "/dev/null")
{
CalculateHashes(Itm, Res);
URIDone(Res);