X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/75a90b93257ea81d42331c03b56bd6589c62e065..40468850491c4f5bc7060763a6f03cdc570d514e:/methods/copy.cc?ds=sidebyside diff --git a/methods/copy.cc b/methods/copy.cc index 94467e054..e81d0022b 100644 --- a/methods/copy.cc +++ b/methods/copy.cc @@ -12,6 +12,7 @@ #include #include +#include #include #include #include @@ -37,7 +38,7 @@ class CopyMethod : public pkgAcqMethod bool CopyMethod::Fetch(FetchItem *Itm) { URI Get = Itm->Uri; - string File = Get.Path; + std::string File = Get.Path; // Stat the file and send a start message struct stat Buf; @@ -84,7 +85,7 @@ bool CopyMethod::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);