From 0908ad400584f19181f9d6e762c85e8a59092585 Mon Sep 17 00:00:00 2001 From: Danil Alexeev Date: Thu, 29 Feb 2024 16:04:31 +0300 Subject: [PATCH] GDScript: Fix paths in `ResourceFormatLoaderGDScript::load()` --- modules/gdscript/gdscript.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp index 70f4411dec3b..94aa07701443 100644 --- a/modules/gdscript/gdscript.cpp +++ b/modules/gdscript/gdscript.cpp @@ -2818,11 +2818,11 @@ Ref GDScriptLanguage::get_script_by_fully_qualified_name(const String Ref ResourceFormatLoaderGDScript::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) { Error err; bool ignoring = p_cache_mode == CACHE_MODE_IGNORE || p_cache_mode == CACHE_MODE_IGNORE_DEEP; - Ref scr = GDScriptCache::get_full_script(p_path, err, "", ignoring); + Ref scr = GDScriptCache::get_full_script(p_original_path, err, "", ignoring); if (err && scr.is_valid()) { // If !scr.is_valid(), the error was likely from scr->load_source_code(), which already generates an error. - ERR_PRINT_ED(vformat(R"(Failed to load script "%s" with error "%s".)", p_path, error_names[err])); + ERR_PRINT_ED(vformat(R"(Failed to load script "%s" with error "%s".)", p_original_path, error_names[err])); } if (r_error) {