1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-14 13:41:12 +00:00

Merge pull request #90038 from AThousandShips/load_path

[Core] Fix `ResourceLoader.load` cache with relative paths
This commit is contained in:
Rémi Verschelde
2024-04-04 14:36:51 +02:00

View File

@@ -402,7 +402,7 @@ static String _validate_local_path(const String &p_path) {
if (uid != ResourceUID::INVALID_ID) {
return ResourceUID::get_singleton()->get_id_path(uid);
} else if (p_path.is_relative_path()) {
return "res://" + p_path;
return ("res://" + p_path).simplify_path();
} else {
return ProjectSettings::get_singleton()->localize_path(p_path);
}