mirror of
https://github.com/godotengine/godot.git
synced 2025-02-14 14:50:46 +00:00
Merge pull request #7172 from Faless/fix_localize_path
Properly localize absolute path that starts with the resource folder.
This commit is contained in:
commit
830ab4ea8d
@ -54,7 +54,8 @@ String Globals::localize_path(const String& p_path) const {
|
|||||||
if (resource_path=="")
|
if (resource_path=="")
|
||||||
return p_path; //not initialied yet
|
return p_path; //not initialied yet
|
||||||
|
|
||||||
if (p_path.begins_with("res://") || p_path.begins_with("user://") || p_path.is_abs_path())
|
if (p_path.begins_with("res://") || p_path.begins_with("user://") ||
|
||||||
|
(p_path.is_abs_path() && !p_path.begins_with(resource_path)))
|
||||||
return p_path.simplify_path();
|
return p_path.simplify_path();
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user