mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 17:41:12 +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";
|
QString lockFileName = _filename + ".lock";
|
||||||
std::ifstream lockFile(qPrintable(lockFileName), std::ios::in | std::ios::binary | std::ios::ate);
|
std::ifstream lockFile(qPrintable(lockFileName), std::ios::in | std::ios::binary | std::ios::ate);
|
||||||
if (lockFile.is_open()) {
|
if (lockFile.is_open()) {
|
||||||
qCDebug(octree) << "WARNING: Octree lock file detected at startup:" << lockFileName
|
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();
|
|
||||||
|
|
||||||
lockFile.close();
|
lockFile.close();
|
||||||
qCDebug(octree) << "Loading Octree... lock file closed:" << lockFileName;
|
qCDebug(octree) << "Removing lock file:" << lockFileName;
|
||||||
remove(qPrintable(lockFileName));
|
remove(qPrintable(lockFileName));
|
||||||
qCDebug(octree) << "Loading Octree... lock file removed:" << lockFileName;
|
qCDebug(octree) << "Lock file removed:" << lockFileName;
|
||||||
}
|
}
|
||||||
|
|
||||||
persistentFileRead = _tree->readFromFile(qPrintable(_filename.toLocal8Bit()));
|
persistentFileRead = _tree->readFromFile(qPrintable(_filename.toLocal8Bit()));
|
||||||
|
|
Loading…
Reference in a new issue