summaryrefslogtreecommitdiffstats
path: root/Source/cmFileCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-01-04 19:22:57 (GMT)
committerBrad King <brad.king@kitware.com>2008-01-04 19:22:57 (GMT)
commit4e514a5e0009823a07ad9db0552c7b424b0a6eef (patch)
tree137aaaf8fdf766347722b4d44ddbe5eb2f7f5b2f /Source/cmFileCommand.cxx
parenteed9b1b0dac484eea807ac3bb07051b69b94af6b (diff)
downloadCMake-4e514a5e0009823a07ad9db0552c7b424b0a6eef.zip
CMake-4e514a5e0009823a07ad9db0552c7b424b0a6eef.tar.gz
CMake-4e514a5e0009823a07ad9db0552c7b424b0a6eef.tar.bz2
BUG: File installation should overwrite the destination if the file times differ at all rather than only if the source file is newer. Users expect installation to overwrite destination files. This addresses the re-opening of bug#3349.
Diffstat (limited to 'Source/cmFileCommand.cxx')
-rw-r--r--Source/cmFileCommand.cxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 3f93b8d..6186596 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -949,11 +949,8 @@ bool cmFileInstaller::InstallFile(const char* fromFile, const char* toFile,
bool copy = true;
if(!always)
{
- // If both files exist and "fromFile" is not newer than "toFile"
- // do not copy.
- int timeResult;
- if(this->FileTimes.FileTimeCompare(fromFile, toFile, &timeResult) &&
- timeResult <= 0)
+ // If both files exist with the same time do not copy.
+ if(!this->FileTimes.FileTimesDiffer(fromFile, toFile))
{
copy = false;
}