mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
refs #935, avoid timestamp "overflow"
This commit is contained in:
committed by
Mathew Sutcliffe
parent
be24d069fe
commit
1c2ca5fca1
@@ -353,9 +353,17 @@ namespace BlackCore
|
||||
const QDateTime cacheTs(this->getCacheTimestamp(entity));
|
||||
if (!cacheTs.isValid()) { return true; } // we have no cache ts
|
||||
|
||||
const QDateTime hts(this->getLatestSharedFileHeaderTimestamp(entity));
|
||||
if (!hts.isValid()) { return false; }
|
||||
return hts > cacheTs;
|
||||
const QDateTime headerTimestamp(this->getLatestSharedFileHeaderTimestamp(entity));
|
||||
if (!headerTimestamp.isValid()) { return false; }
|
||||
|
||||
// we restrict by latest entity from info objects (if available)
|
||||
// a header ts shall be never newer than the info object, if it is it is an issue with shared file sync
|
||||
const QDateTime infoObjectTs = this->getLatestEntityTimestampFromInfoObjects(entity);
|
||||
if (infoObjectTs.isValid() && infoObjectTs < headerTimestamp)
|
||||
{
|
||||
return infoObjectTs > cacheTs;
|
||||
}
|
||||
return headerTimestamp > cacheTs;
|
||||
}
|
||||
|
||||
CEntityFlags::Entity CDatabaseReader::getEntitesWithNewerHeaderTimestamp(CEntityFlags::Entity entities) const
|
||||
|
||||
Reference in New Issue
Block a user