diff options
| author | Bojidar Marinov | 2017-02-09 12:26:18 +0200 |
|---|---|---|
| committer | Rémi Verschelde | 2017-03-18 20:04:00 +0100 |
| commit | 9f536e3962e58162f0b8136ba969c07dcfd8863d (patch) | |
| tree | 6ae3deb94c567f4984185162555f1f59e5af714e | |
| parent | ca2277f3f1e6a7bd49597d4f498585dd5dcc5da2 (diff) | |
| download | godot-9f536e3962e58162f0b8136ba969c07dcfd8863d.tar.gz godot-9f536e3962e58162f0b8136ba969c07dcfd8863d.tar.zst godot-9f536e3962e58162f0b8136ba969c07dcfd8863d.zip | |
Make _sc_ files work like ._sc_, fixes #7762
(cherry picked from commit 27bb6b5282ee62ade086f840ec78ca65d31c081d)
| -rw-r--r-- | tools/editor/editor_settings.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/editor/editor_settings.cpp b/tools/editor/editor_settings.cpp index a1464b3ad..0c7d5216e 100644 --- a/tools/editor/editor_settings.cpp +++ b/tools/editor/editor_settings.cpp @@ -238,12 +238,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")) { |
