Fix non-creation of editor temporary dir

This commit is contained in:
Adam Scott 2024-12-17 09:18:12 -05:00
parent 4364ed6ccd
commit 741f6c71d7
No known key found for this signature in database
GPG key ID: F6BA2A0302E21A77

View file

@ -237,6 +237,17 @@ EditorPaths::EditorPaths() {
}
}
// Temporary dir.
{
if (dir->change_dir(temp_dir) != OK) {
dir->make_dir_recursive(temp_dir);
if (dir->change_dir(temp_dir) != OK) {
ERR_PRINT("Could not create editor temporary directory: " + temp_dir);
paths_valid = false;
}
}
}
// Validate or create project-specific editor data dir,
// including shader cache subdir.
if (Engine::get_singleton()->is_project_manager_hint() || (Main::is_cmdline_tool() && !ProjectSettings::get_singleton()->is_project_loaded())) {