1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-23 15:16:17 +00:00

Properly handle absolute paths in Globals::localize_path

This give a proper fix for #4280 - #3106 , allowing absolute paths
that starts from the file system, not the resource folder
This commit is contained in:
Fabio Alessandrelli
2016-10-13 11:30:04 +02:00
parent 11349a786b
commit 2f2cea070e

View File

@@ -54,7 +54,7 @@ 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://")) if (p_path.begins_with("res://") || p_path.begins_with("user://") || p_path.is_abs_path())
return p_path.simplify_path(); return p_path.simplify_path();