Explorar o código

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

(cherry picked from commit 2f2cea070e062415f290103f1823ab17ea4e5874)
Fabio Alessandrelli %!s(int64=9) %!d(string=hai) anos
pai
achega
ea48675ffa
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      core/globals.cpp

+ 1 - 1
core/globals.cpp

@@ -54,7 +54,7 @@ String Globals::localize_path(const String& p_path) const {
 	if (resource_path=="")
 		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();