summaryrefslogtreecommitdiff
path: root/methods/copy.cc
diff options
context:
space:
mode:
Diffstat (limited to 'methods/copy.cc')
-rw-r--r--methods/copy.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/methods/copy.cc b/methods/copy.cc
index 40f8f85ec..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)
@@ -116,5 +124,6 @@ int main()
setlocale(LC_ALL, "");
CopyMethod Mth;
+
return Mth.Run();
}