summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/SystemTools.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/kwsys/SystemTools.cxx')
-rw-r--r--Source/kwsys/SystemTools.cxx8
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