aboutsummaryrefslogtreecommitdiff
path: root/core/globals.cpp
diff options
context:
space:
mode:
authorFabio Alessandrelli2016-10-30 18:22:05 +0100
committerFabio Alessandrelli2016-11-22 09:09:39 +0100
commitcdc97ca4535e99fdcb10f21c4609c2f79e94589b (patch)
treee8b616c74a47a31a8b058429199d2b2c223dc7bb /core/globals.cpp
parent9e2d09f580c319e511d3a816bba8a54138a4bcd1 (diff)
downloadgodot-cdc97ca4535e99fdcb10f21c4609c2f79e94589b.tar.gz
godot-cdc97ca4535e99fdcb10f21c4609c2f79e94589b.tar.zst
godot-cdc97ca4535e99fdcb10f21c4609c2f79e94589b.zip
Diffstat (limited to 'core/globals.cpp')
-rw-r--r--core/globals.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/globals.cpp b/core/globals.cpp
index bef40ff33..78b97882b 100644
--- a/core/globals.cpp
+++ b/core/globals.cpp
@@ -54,7 +54,8 @@ 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://") || 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();