mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 09:33:36 +02:00
fix runaway backup bug
This commit is contained in:
parent
4eaf1d21aa
commit
17ed92cf7e
1 changed files with 5 additions and 0 deletions
|
@ -189,6 +189,9 @@ void OctreePersistThread::backup() {
|
|||
quint64 intervalToBackup = _backupInterval * MSECS_TO_USECS;
|
||||
|
||||
if (sinceLastBackup > intervalToBackup) {
|
||||
qDebug() << "Time since last backup [" << sinceLastBackup << "] exceeds backup interval ["
|
||||
<< intervalToBackup << "] doing backup now...";
|
||||
|
||||
struct tm* localTime = localtime(&_lastPersistTime);
|
||||
|
||||
QString backupFileName;
|
||||
|
@ -213,6 +216,8 @@ void OctreePersistThread::backup() {
|
|||
} else {
|
||||
qDebug() << "ERROR in backing up persist file...";
|
||||
}
|
||||
|
||||
_lastBackup = now;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue