Răsfoiți Sursa

Merge pull request #103805 from rsubtil/fix-recovery_lock_on_import

Fix recovery mode lock file not being cleared on import/export
Thaddeus Crews 5 luni în urmă
părinte
comite
807ce83f00
1 a modificat fișierele cu 6 adăugiri și 0 ștergeri
  1. 6 0
      main/main.cpp

+ 6 - 0
main/main.cpp

@@ -4904,6 +4904,12 @@ void Main::cleanup(bool p_force) {
 	ResourceSaver::remove_custom_savers();
 	PropertyListHelper::clear_base_helpers();
 
+	// Remove the lock file if the engine exits successfully. Some automated processes such as
+	// --export/--import can bypass and/or finish faster than the existing check to remove the lock file.
+	if (OS::get_singleton()->get_exit_code() == EXIT_SUCCESS) {
+		OS::get_singleton()->remove_lock_file();
+	}
+
 	// Flush before uninitializing the scene, but delete the MessageQueue as late as possible.
 	message_queue->flush();