X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/dc738e7ae6a9c14992279dc2c52f71b14ced53aa..ac3dee0e5091f19b77de96eec5241cb57c13f2a1:/methods/copy.cc diff --git a/methods/copy.cc b/methods/copy.cc index 87e77eda3..027b59f46 100644 --- a/methods/copy.cc +++ b/methods/copy.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: copy.cc,v 1.7 2003/02/10 07:34:41 doogie Exp $ +// $Id: copy.cc,v 1.7.2.1 2004/01/16 18:58:50 mdz Exp $ /* ###################################################################### Copy URI - This method takes a uri like a file: uri and copies it @@ -9,14 +9,15 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ -#include #include #include #include +#include #include #include #include +#include /*}}}*/ class CopyMethod : public pkgAcqMethod @@ -79,6 +80,11 @@ bool CopyMethod::Fetch(FetchItem *Itm) return _error->Errno("utime",_("Failed to set modification time")); } + Hashes Hash; + FileFd Fd(Res.Filename, FileFd::ReadOnly); + Hash.AddFD(Fd.Fd(), Fd.Size()); + Res.TakeHashes(Hash); + URIDone(Res); return true; } @@ -86,6 +92,8 @@ bool CopyMethod::Fetch(FetchItem *Itm) int main() { + setlocale(LC_ALL, ""); + CopyMethod Mth; return Mth.Run(); }