BUG: If source and destination is the same file, then do not copy file always

This commit is contained in:
Andy Cedilnik 2004-07-20 11:09:58 -04:00
parent 42ea896d22
commit 6d3ba1ed27
1 changed files with 5 additions and 0 deletions

View File

@ -910,6 +910,11 @@ bool SystemTools::FilesDiffer(const char* source,
*/ */
bool SystemTools::CopyFileAlways(const char* source, const char* destination) 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; const int bufferSize = 4096;
char buffer[bufferSize]; char buffer[bufferSize];