diff options
author | Poommetee Ketson <poommetee@protonmail.com> | 2017-09-12 05:03:11 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-12 05:03:11 +0700 |
commit | 513ea0ff3281337aa45d6e87460c1de6939e06b9 (patch) | |
tree | 597eaf308e793782effb4670bcec953c7653a754 | |
parent | b19ab0dd79af6f907fa6a1bf4d4c6e838b6e1b57 (diff) | |
parent | 20442d0a896445268f0991953f8b785bdc9747cf (diff) |
Merge pull request #11148 from GodotExplorer/pr-globalize_path_with_data_dir
Add user data directory support for ProjectSettings::globalize_path
-rw-r--r-- | core/project_settings.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/core/project_settings.cpp b/core/project_settings.cpp index a74917162b..23e4961138 100644 --- a/core/project_settings.cpp +++ b/core/project_settings.cpp @@ -114,7 +114,15 @@ String ProjectSettings::globalize_path(const String &p_path) const { return p_path.replace("res:/", resource_path); }; return p_path.replace("res://", ""); - }; + } else if (p_path.begins_with("user://")) { + + String data_dir = OS::get_singleton()->get_data_dir(); + if (data_dir != "") { + + return p_path.replace("user:/", data_dir); + }; + return p_path.replace("user://", ""); + } return p_path; } |