1
0
forked from 0ad/0ad

Fix FAT-tolerant timestamp comparison

This was SVN commit r8075.
This commit is contained in:
Ykkrosh 2010-09-04 16:46:10 +00:00
parent 5068304a73
commit 014d504e3a

View File

@ -53,7 +53,7 @@ bool VfsFile::IsSupersededBy(const VfsFile& file) const
const double threshold = 2.0; // [seconds]; resolution provided by FAT const double threshold = 2.0; // [seconds]; resolution provided by FAT
if(howMuchNewer > threshold) // newer timestamp if(howMuchNewer > threshold) // newer timestamp
return true; return true;
if(howMuchNewer < threshold) // older timestamp if(howMuchNewer < -threshold) // older timestamp
return false; return false;
// else: "equal" (tolerating small differences due to FAT's low // else: "equal" (tolerating small differences due to FAT's low
// mtime resolution) // mtime resolution)