]> git.saurik.com Git - apt.git/blobdiff - methods/file.cc
cleanup the hash iteration. unfortunately there is no 1:1 mapping from Hashes::Suppor...
[apt.git] / methods / file.cc
index d58652e6eaba140764f18220014c790c4dba919d..7ed4e6f60110bd1627d27f09c06952798dc07d54 100644 (file)
@@ -19,6 +19,7 @@
 #include <apt-pkg/error.h>
 #include <apt-pkg/hashes.h>
 #include <apt-pkg/fileutl.h>
+#include <apt-pkg/strutl.h>
 
 #include <sys/stat.h>
 #include <unistd.h>
@@ -82,7 +83,7 @@ bool FileMethod::Fetch(FetchItem *Itm)
 
    Hashes Hash;
    FileFd Fd(Res.Filename, FileFd::ReadOnly);
-   Hash.AddFD(Fd.Fd(), Fd.Size());
+   Hash.AddFD(Fd);
    Res.TakeHashes(Hash);
    URIDone(Res);
    return true;