Skip to content

Commit 0908ad4

Browse files
committed
GDScript: Fix paths in ResourceFormatLoaderGDScript::load()
1 parent b5d30f9 commit 0908ad4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/gdscript/gdscript.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2818,11 +2818,11 @@ Ref<GDScript> GDScriptLanguage::get_script_by_fully_qualified_name(const String
28182818
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) {
28192819
Error err;
28202820
bool ignoring = p_cache_mode == CACHE_MODE_IGNORE || p_cache_mode == CACHE_MODE_IGNORE_DEEP;
2821-
Ref<GDScript> scr = GDScriptCache::get_full_script(p_path, err, "", ignoring);
2821+
Ref<GDScript> scr = GDScriptCache::get_full_script(p_original_path, err, "", ignoring);
28222822

28232823
if (err && scr.is_valid()) {
28242824
// If !scr.is_valid(), the error was likely from scr->load_source_code(), which already generates an error.
2825-
ERR_PRINT_ED(vformat(R"(Failed to load script "%s" with error "%s".)", p_path, error_names[err]));
2825+
ERR_PRINT_ED(vformat(R"(Failed to load script "%s" with error "%s".)", p_original_path, error_names[err]));
28262826
}
28272827

28282828
if (r_error) {

0 commit comments

Comments
 (0)