diff options
author | Michael Vogt <mvo@ubuntu.com> | 2014-10-07 20:06:44 +0200 |
---|---|---|
committer | Michael Vogt <mvo@ubuntu.com> | 2014-10-07 20:06:44 +0200 |
commit | 7e4dfb4349e909c15b1c777679fdae81d76eeb62 (patch) | |
tree | eee10c0c531f58041ce707689c997eff234f3898 /methods/copy.cc | |
parent | c48eea97b93920062ea26001081d4fdf7eb967e3 (diff) | |
parent | 4d0818cc39f7c0d44ecdfcdf9701058f81caa492 (diff) |
Merge branch 'feature/acq-trans' into feature/expected-size
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) |