diff options
author | Michael Vogt <mvo@ubuntu.com> | 2014-10-08 08:36:53 +0200 |
---|---|---|
committer | Michael Vogt <mvo@ubuntu.com> | 2014-10-08 08:36:53 +0200 |
commit | a943fbf21ca0b9b58b8f1492fc518679b1d7c749 (patch) | |
tree | 8db7050b025ca3918ff3e5ebad00f3a7f339a7d2 /methods/copy.cc | |
parent | 8f45798d532223adc378a4ad9ecfc64b3be26e4f (diff) | |
parent | f9a3c4bde867e70e8c89b6ed5924ab9fab517096 (diff) |
Merge remote-tracking branch 'mvo/feature/acq-trans' into debian/experimental
Diffstat (limited to 'methods/copy.cc')
-rw-r--r-- | methods/copy.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/methods/copy.cc b/methods/copy.cc index f542a27c0..a23c0316c 100644 --- a/methods/copy.cc +++ b/methods/copy.cc @@ -67,6 +67,14 @@ bool CopyMethod::Fetch(FetchItem *Itm) Res.LastModified = Buf.st_mtime; Res.IMSHit = false; URIStart(Res); + + // when the files are identical, just compute the hashes + if(File == Itm->DestFile) + { + CalculateHashes(Res); + URIDone(Res); + return true; + } // just calc the hashes if the source and destination are identical if (File == Itm->DestFile) |