diff options
author | Brad King <brad.king@kitware.com> | 2019-03-28 15:06:43 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-03-28 15:06:43 (GMT) |
commit | 24da7da68657c7c719e908f519c0f94da3a15701 (patch) | |
tree | 568cbc3959347de18f9822f13ed92a6132c57346 /Source/kwsys/SystemTools.cxx | |
parent | fcfbc01d68aac2eca7435bfa0f01e5d1b3524303 (diff) | |
parent | 816663495874e123c2d4a187edb6eab07593f10d (diff) | |
download | CMake-24da7da68657c7c719e908f519c0f94da3a15701.zip CMake-24da7da68657c7c719e908f519c0f94da3a15701.tar.gz CMake-24da7da68657c7c719e908f519c0f94da3a15701.tar.bz2 |
Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
KWSys 2019-03-28 (e92bdbe8)
Diffstat (limited to 'Source/kwsys/SystemTools.cxx')
-rw-r--r-- | Source/kwsys/SystemTools.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx index b736ed4..87da80e 100644 --- a/Source/kwsys/SystemTools.cxx +++ b/Source/kwsys/SystemTools.cxx @@ -2436,10 +2436,6 @@ static bool CloneFileContent(const std::string& source, bool SystemTools::CopyFileAlways(const std::string& source, const std::string& destination) { - // If files are the same do not copy - if (SystemTools::SameFile(source, destination)) { - return true; - } mode_t perm = 0; bool perms = SystemTools::GetPermissions(source, perm); std::string real_destination = destination; @@ -2460,6 +2456,10 @@ bool SystemTools::CopyFileAlways(const std::string& source, } else { destination_dir = SystemTools::GetFilenamePath(destination); } + // If files are the same do not copy + if (SystemTools::SameFile(source, real_destination)) { + return true; + } // Create destination directory |