Closed neikeq closed 7 years ago
CC @Faless
Yeah, I really messed up this path thing :-1: . Anyway, can someone check if the small patch referencing this issue is ok? It is in my mind, but I'm not completely sure about the behavior of localize_path. This way if the path is absolute will be localized if a subfolder of the resource folder, it will be left absolute otherwise.
@Faless I tested your patch with "res://player.gd" and "res://folder/test.gd" globalized and both succeeded at localizing the path.
However, wouldn't the following be better?:
if (p_path.is_abs_path() && !p_path.begins_with(resource_path)) {
return p_path;
}
// Otherwise continue with the function, which localizes the path
// It seems to do more than just calling replace
Issue description (what happened, and what was expected): Regression from #6813
Globals.localize_path(String path)
is returning the same absolute path that was passed to it, instead of the localized path.Steps to reproduce:
Example with the Platformer 2D demo: