]> git.saurik.com Git - apt.git/blobdiff - methods/file.cc
calculate only expected hashes in methods
[apt.git] / methods / file.cc
index 5d9d7b951884c5e105297fc84ccf3c1e298ea21d..043ab04b8286c68c03ad8290a5a1f0c918ba7eef 100644 (file)
@@ -87,7 +87,7 @@ bool FileMethod::Fetch(FetchItem *Itm)
    if (Res.Filename.empty() == true)
       return _error->Error(_("File not found"));
 
    if (Res.Filename.empty() == true)
       return _error->Error(_("File not found"));
 
-   Hashes Hash;
+   Hashes Hash(Itm->ExpectedHashes);
    FileFd Fd(Res.Filename, FileFd::ReadOnly);
    Hash.AddFD(Fd);
    Res.TakeHashes(Hash);
    FileFd Fd(Res.Filename, FileFd::ReadOnly);
    Hash.AddFD(Fd);
    Res.TakeHashes(Hash);