mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-09 21:32:31 +02:00
Merge pull request #12800 from huffman/fix/entity-lock
Remove lock file recovery in entity server
This commit is contained in:
commit
c8d109854b
1 changed files with 3 additions and 8 deletions
|
@ -192,17 +192,12 @@ bool OctreePersistThread::process() {
|
|||
QString lockFileName = _filename + ".lock";
|
||||
std::ifstream lockFile(qPrintable(lockFileName), std::ios::in | std::ios::binary | std::ios::ate);
|
||||
if (lockFile.is_open()) {
|
||||
qCDebug(octree) << "WARNING: Octree lock file detected at startup:" << lockFileName
|
||||
<< "-- Attempting to restore from previous backup file.";
|
||||
|
||||
// This is where we should attempt to find the most recent backup and restore from
|
||||
// that file as our persist file.
|
||||
restoreFromMostRecentBackup();
|
||||
qCDebug(octree) << "WARNING: Octree lock file detected at startup:" << lockFileName;
|
||||
|
||||
lockFile.close();
|
||||
qCDebug(octree) << "Loading Octree... lock file closed:" << lockFileName;
|
||||
qCDebug(octree) << "Removing lock file:" << lockFileName;
|
||||
remove(qPrintable(lockFileName));
|
||||
qCDebug(octree) << "Loading Octree... lock file removed:" << lockFileName;
|
||||
qCDebug(octree) << "Lock file removed:" << lockFileName;
|
||||
}
|
||||
|
||||
persistentFileRead = _tree->readFromFile(qPrintable(_filename.toLocal8Bit()));
|
||||
|
|
Loading…
Reference in a new issue