summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-02-29 15:18:55 +0100
committerRémi Verschelde <rverschelde@gmail.com>2024-02-29 15:18:55 +0100
commit7d2ca2d8ac49cde9767e00b70f9eaf1920eb266d (patch)
tree6bc1730754884c082f3f0d97e312adb146110085 /modules/gdscript/gdscript.cpp
parent5c38a9fe82a309fc6012a25111d3a807b70c65f6 (diff)
parent0908ad400584f19181f9d6e762c85e8a59092585 (diff)
downloadredot-engine-7d2ca2d8ac49cde9767e00b70f9eaf1920eb266d.tar.gz
Merge pull request #89005 from dalexeev/gds-fix-res-format-loader-path
GDScript: Fix paths in `ResourceFormatLoaderGDScript::load()`
Diffstat (limited to 'modules/gdscript/gdscript.cpp')
-rw-r--r--modules/gdscript/gdscript.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp
index 70f4411dec..94aa077014 100644
--- a/modules/gdscript/gdscript.cpp
+++ b/modules/gdscript/gdscript.cpp
@@ -2818,11 +2818,11 @@ Ref<GDScript> GDScriptLanguage::get_script_by_fully_qualified_name(const String
Ref<Resource> 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<GDScript> scr = GDScriptCache::get_full_script(p_path, err, "", ignoring);
+ Ref<GDScript> 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) {