X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/96b83b826ef733fa4fdfe99dd5009cba5af9a2c4..6e7c6c3f58193fd5db3d9d598ac65a1571522a58:/methods/copy.cc

diff --git a/methods/copy.cc b/methods/copy.cc
index 3f367e72a..72896b4c0 100644
--- a/methods/copy.cc
+++ b/methods/copy.cc
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description								/*{{{*/
-// $Id: copy.cc,v 1.8 2004/01/07 20:39:38 mdz 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
@@ -12,6 +12,7 @@
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/acquire-method.h>
 #include <apt-pkg/error.h>
+#include <apt-pkg/hashes.h>
 
 #include <sys/stat.h>
 #include <utime.h>
@@ -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;
 }