diff options
| author | Juan Linietsky | 2016-05-01 23:12:30 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2016-05-01 23:13:06 -0300 |
| commit | 5bb7cef8367e77c70b9a1ad045741fb97b32ef9d (patch) | |
| tree | 461126bb68ce9199a9a08b8fe4e3bdde44b9a280 /core/globals.cpp | |
| parent | 957c265f11fc5f244e24bb4d5442fedba4e32634 (diff) | |
| download | godot-5bb7cef8367e77c70b9a1ad045741fb97b32ef9d.tar.gz godot-5bb7cef8367e77c70b9a1ad045741fb97b32ef9d.tar.zst godot-5bb7cef8367e77c70b9a1ad045741fb97b32ef9d.zip | |
Diffstat (limited to 'core/globals.cpp')
| -rw-r--r-- | core/globals.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/globals.cpp b/core/globals.cpp index c0c1171ae..020e05fb8 100644 --- a/core/globals.cpp +++ b/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.find(":/") != -1) + if (p_path.begins_with("res://") || p_path.begins_with("user://")) return p_path.simplify_path(); @@ -82,6 +82,8 @@ String Globals::localize_path(const String& p_path) const { if (sep == -1) { return "res://"+path; }; + + String parent = path.substr(0, sep); String plocal = localize_path(parent); |
