summaryrefslogtreecommitdiff
path: root/modules/mono
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-11-20 00:42:51 +0100
committerGitHub <noreply@github.com>2017-11-20 00:42:51 +0100
commitecf80fbbbadaa782cbe81a6562916331c6762970 (patch)
tree7a949f6a95f36303a2f2d193aeabd6486e13f4a1 /modules/mono
parentbc26a5bd3a51b11bab63112275e7045c63a0ffc4 (diff)
parent6e3f2f44af808e9f4255c2462e16beee844c0df7 (diff)
Merge pull request #12988 from akien-mga/xdg-home-paths
Add support for XDG Base Directory spec
Diffstat (limited to 'modules/mono')
-rw-r--r--modules/mono/godotsharp_dirs.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/modules/mono/godotsharp_dirs.cpp b/modules/mono/godotsharp_dirs.cpp
index 7cc2168b70..a0c2508b0d 100644
--- a/modules/mono/godotsharp_dirs.cpp
+++ b/modules/mono/godotsharp_dirs.cpp
@@ -57,7 +57,7 @@ String _get_expected_build_config() {
String _get_mono_user_dir() {
#ifdef TOOLS_ENABLED
if (EditorSettings::get_singleton()) {
- return EditorSettings::get_singleton()->get_settings_path().plus_file("mono");
+ return EditorSettings::get_singleton()->get_data_dir().plus_file("mono");
} else {
String settings_path;
@@ -68,19 +68,13 @@ String _get_mono_user_dir() {
// contain yourself
settings_path = exe_dir.plus_file("editor_data");
} else {
- if (OS::get_singleton()->has_environment("APPDATA")) {
- String app_data = OS::get_singleton()->get_environment("APPDATA").replace("\\", "/");
- settings_path = app_data.plus_file(String(_MKSTR(VERSION_SHORT_NAME)).capitalize());
- } else if (OS::get_singleton()->has_environment("HOME")) {
- String home = OS::get_singleton()->get_environment("HOME");
- settings_path = home.plus_file("." + String(_MKSTR(VERSION_SHORT_NAME)).to_lower());
- }
+ settings_path = OS::get_singleton()->get_data_path().plus_file(OS::get_singleton()->get_godot_dir_name());
}
return settings_path.plus_file("mono");
}
#else
- return OS::get_singleton()->get_data_dir().plus_file("mono");
+ return OS::get_singleton()->get_user_data_dir().plus_file("mono");
#endif
}