From 9f536e3962e58162f0b8136ba969c07dcfd8863d Mon Sep 17 00:00:00 2001 From: Bojidar Marinov Date: Thu, 9 Feb 2017 12:26:18 +0200 Subject: [PATCH] Make _sc_ files work like ._sc_, fixes #7762 (cherry picked from commit 27bb6b5282ee62ade086f840ec78ca65d31c081d) --- tools/editor/editor_settings.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tools/editor/editor_settings.cpp b/tools/editor/editor_settings.cpp index a1464b3ad1..0c7d5216e0 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); - if (d->file_exists(exe_path + "/._sc_")) { + 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")) {