diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-04-16 10:34:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-16 10:34:39 +0200 |
commit | 200d9a734c18378abebee3ea7adac38782472587 (patch) | |
tree | 634f6130064832264a4206f438bc35a58d4b3348 /core | |
parent | a3ca7844b39bacc11e126a4428297b39759032e5 (diff) | |
parent | b25ab27d4aeba4c4ac1fce4c818f2baa472687ab (diff) |
Merge pull request #47701 from vnen/gdscript-test-runner
Diffstat (limited to 'core')
-rw-r--r-- | core/config/project_settings.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/core/config/project_settings.cpp b/core/config/project_settings.cpp index f87dc6704e..25dd408dce 100644 --- a/core/config/project_settings.cpp +++ b/core/config/project_settings.cpp @@ -467,16 +467,17 @@ Error ProjectSettings::_setup(const String &p_path, const String &p_main_pack, b d->change_dir(p_path); String current_dir = d->get_current_dir(); - String candidate = current_dir; bool found = false; Error err; while (true) { + // Set the resource path early so things can be resolved when loading. + resource_path = current_dir; + resource_path = resource_path.replace("\\", "/"); // Windows path to Unix path just in case. err = _load_settings_text_or_binary(current_dir.plus_file("project.godot"), current_dir.plus_file("project.binary")); if (err == OK) { // Optional, we don't mind if it fails. _load_settings_text(current_dir.plus_file("override.cfg")); - candidate = current_dir; found = true; break; } @@ -493,8 +494,6 @@ Error ProjectSettings::_setup(const String &p_path, const String &p_main_pack, b } } - resource_path = candidate; - resource_path = resource_path.replace("\\", "/"); // Windows path to Unix path just in case. memdelete(d); if (!found) { |