mirror of
https://github.com/glest/glest-source.git
synced 2025-08-16 13:23:59 +02:00
- force CRC's to be recalculated if on or before July 6 2012
This commit is contained in:
@@ -658,8 +658,23 @@ pair<bool,time_t> hasCachedFileCRCValue(string crcCacheFile, uint32 &value) {
|
|||||||
|
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
|
|
||||||
|
struct tm future; /* as in future date */
|
||||||
|
future.tm_sec = 0;
|
||||||
|
future.tm_min = 0;
|
||||||
|
future.tm_hour = 0;
|
||||||
|
future.tm_mday = 6; /* 1st */
|
||||||
|
future.tm_mon = 6; /* July */
|
||||||
|
future.tm_year = 2012 - 1900; /* 2038 in years since 1900 */
|
||||||
|
future.tm_isdst = 0; /* Daylight Saving not in affect (UTC) */
|
||||||
|
#ifdef _BSD_SOURCE
|
||||||
|
future.tm_zone = "UTC";
|
||||||
|
#endif
|
||||||
|
|
||||||
|
time_t tBadCRCDate = mktime( &future );
|
||||||
|
|
||||||
result.second = lastUpdateDate;
|
result.second = lastUpdateDate;
|
||||||
if( refreshDate > 0 &&
|
if( refreshDate > 0 &&
|
||||||
|
refreshDate > tBadCRCDate &&
|
||||||
time(NULL) < refreshDate) {
|
time(NULL) < refreshDate) {
|
||||||
|
|
||||||
result.first = true;
|
result.first = true;
|
||||||
|
Reference in New Issue
Block a user