Skip to content

Commit 807ce83

Browse files
committed
Merge pull request #103805 from rsubtil/fix-recovery_lock_on_import
Fix recovery mode lock file not being cleared on import/export
2 parents 7b74eb1 + d776682 commit 807ce83

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

main/main.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4904,6 +4904,12 @@ void Main::cleanup(bool p_force) {
49044904
ResourceSaver::remove_custom_savers();
49054905
PropertyListHelper::clear_base_helpers();
49064906

4907+
// Remove the lock file if the engine exits successfully. Some automated processes such as
4908+
// --export/--import can bypass and/or finish faster than the existing check to remove the lock file.
4909+
if (OS::get_singleton()->get_exit_code() == EXIT_SUCCESS) {
4910+
OS::get_singleton()->remove_lock_file();
4911+
}
4912+
49074913
// Flush before uninitializing the scene, but delete the MessageQueue as late as possible.
49084914
message_queue->flush();
49094915

0 commit comments

Comments
 (0)