mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Use minor version in EditorSettings file name
This commit is contained in:
parent
9bc49a66ba
commit
12f39befa9
3 changed files with 33 additions and 10 deletions
|
@ -2518,12 +2518,10 @@ Error Main::setup2() {
|
|||
|
||||
// Editor setting class is not available, load config directly.
|
||||
if (!init_use_custom_screen && (editor || project_manager) && EditorPaths::get_singleton()->are_paths_valid()) {
|
||||
Ref<DirAccess> dir = DirAccess::open(EditorPaths::get_singleton()->get_config_dir());
|
||||
ERR_FAIL_COND_V(dir.is_null(), FAILED);
|
||||
ERR_FAIL_COND_V(!DirAccess::dir_exists_absolute(EditorPaths::get_singleton()->get_config_dir()), FAILED);
|
||||
|
||||
String config_file_name = "editor_settings-" + itos(VERSION_MAJOR) + ".tres";
|
||||
String config_file_path = EditorPaths::get_singleton()->get_config_dir().path_join(config_file_name);
|
||||
if (dir->file_exists(config_file_name)) {
|
||||
String config_file_path = EditorSettings::get_existing_settings_path();
|
||||
if (FileAccess::exists(config_file_path)) {
|
||||
Error err;
|
||||
Ref<FileAccess> f = FileAccess::open(config_file_path, FileAccess::READ, &err);
|
||||
if (f.is_valid()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue