1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-25 15:37:42 +00:00

GDScript: Canonicalize script path in FQCN

This commit is contained in:
Danil Alexeev
2024-02-26 10:46:24 +03:00
parent 81f3d43cc1
commit 8ffc50ee8c
5 changed files with 15 additions and 17 deletions

View File

@@ -1405,16 +1405,11 @@ String GDScript::debug_get_script_name(const Ref<Script> &p_script) {
}
#endif
bool GDScript::is_equal_gdscript_paths(const String &p_path_a, const String &p_path_b) {
String path_a = p_path_a;
if (path_a.get_extension() == "gdc") {
path_a = path_a.get_basename() + ".gd";
String GDScript::canonicalize_path(const String &p_path) {
if (p_path.get_extension() == "gdc") {
return p_path.get_basename() + ".gd";
}
String path_b = p_path_b;
if (path_b.get_extension() == "gdc") {
path_b = path_b.get_basename() + ".gd";
}
return path_a == path_b;
return p_path;
}
GDScript::UpdatableFuncPtr::UpdatableFuncPtr(GDScriptFunction *p_function) {