diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-02-12 23:22:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-12 23:22:13 +0100 |
commit | f3d339e33fa0c0f7e98f4ffee068b153c038bb9b (patch) | |
tree | c558b07c013651ac0a9fe794b2315bcc4ea781a0 /tools | |
parent | bbc6543172b3a55534e2a8ae3d31349f71d277c6 (diff) | |
parent | 27bb6b5282ee62ade086f840ec78ca65d31c081d (diff) |
Merge pull request #7768 from bojidar-bg/sc-multiple-names
Make _sc_ files work like ._sc_
Diffstat (limited to 'tools')
-rw-r--r-- | tools/editor/editor_settings.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/editor/editor_settings.cpp b/tools/editor/editor_settings.cpp index f504bfc5af..6d9f1bd979 100644 --- a/tools/editor/editor_settings.cpp +++ b/tools/editor/editor_settings.cpp @@ -242,13 +242,20 @@ void EditorSettings::create() { String exe_path = OS::get_singleton()->get_executable_path().get_base_dir(); DirAccess* d = DirAccess::create_for_path(exe_path); + bool self_contained = false; if (d->file_exists(exe_path + "/._sc_")) { + self_contained = true; + extra_config->load(exe_path + "/._sc_"); + } else if (d->file_exists(exe_path + "/_sc_")) { + self_contained = true; + extra_config->load(exe_path + "/_sc_"); + } + if (self_contained) { // editor is self contained config_path = exe_path; config_dir = "editor_data"; - extra_config->load(exe_path + "/._sc_"); } else { if (OS::get_singleton()->has_environment("APPDATA")) { |