Commit 4e514a5e authored by Brad King's avatar Brad King
Browse files

BUG: File installation should overwrite the destination if the file times...

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.
parent eed9b1b0
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment