X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/dc738e7ae6a9c14992279dc2c52f71b14ced53aa..8f3d83eeaec58e9347fe4c61dae18686782f94ca:/methods/copy.cc?ds=inline diff --git a/methods/copy.cc b/methods/copy.cc index 87e77eda3..72896b4c0 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,10 @@ 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 +91,8 @@ bool CopyMethod::Fetch(FetchItem *Itm) int main() { + setlocale(LC_ALL, ""); + CopyMethod Mth; return Mth.Run(); }