Make _sc_ files work like ._sc_, fixes #7762

This commit is contained in:
Bojidar Marinov 2017-02-09 12:26:18 +02:00
parent b19c9bd198
commit 27bb6b5282
No known key found for this signature in database
GPG key ID: 4D546A8F1E091856

View file

@ -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")) {