From 6d3ba1ed2753de237b467da50bcd5630f758456a Mon Sep 17 00:00:00 2001 From: Andy Cedilnik Date: Tue, 20 Jul 2004 11:09:58 -0400 Subject: [PATCH] BUG: If source and destination is the same file, then do not copy file always --- Source/kwsys/SystemTools.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx index c13ffc2db..82c6525aa 100644 --- a/Source/kwsys/SystemTools.cxx +++ b/Source/kwsys/SystemTools.cxx @@ -910,6 +910,11 @@ bool SystemTools::FilesDiffer(const char* source, */ bool SystemTools::CopyFileAlways(const char* source, const char* destination) { + // If files are the same do not copy + if ( SystemTools::SameFile(source, destination) ) + { + return true; + } const int bufferSize = 4096; char buffer[bufferSize];