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.

This commit is contained in:
Brad King 2008-01-04 14:22:57 -05:00
parent eed9b1b0da
commit 4e514a5e00

View File

@ -949,11 +949,8 @@ bool cmFileInstaller::InstallFile(const char* fromFile, const char* toFile,
bool copy = true; bool copy = true;
if(!always) if(!always)
{ {
// If both files exist and "fromFile" is not newer than "toFile" // If both files exist with the same time do not copy.
// do not copy. if(!this->FileTimes.FileTimesDiffer(fromFile, toFile))
int timeResult;
if(this->FileTimes.FileTimeCompare(fromFile, toFile, &timeResult) &&
timeResult <= 0)
{ {
copy = false; copy = false;
} }