You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-15 13:51:40 +00:00
Merge pull request #7768 from bojidar-bg/sc-multiple-names
Make _sc_ files work like ._sc_
This commit is contained in:
@@ -242,13 +242,20 @@ void EditorSettings::create() {
|
|||||||
|
|
||||||
String exe_path = OS::get_singleton()->get_executable_path().get_base_dir();
|
String exe_path = OS::get_singleton()->get_executable_path().get_base_dir();
|
||||||
DirAccess* d = DirAccess::create_for_path(exe_path);
|
DirAccess* d = DirAccess::create_for_path(exe_path);
|
||||||
|
bool self_contained = false;
|
||||||
|
|
||||||
if (d->file_exists(exe_path + "/._sc_")) {
|
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
|
// editor is self contained
|
||||||
config_path = exe_path;
|
config_path = exe_path;
|
||||||
config_dir = "editor_data";
|
config_dir = "editor_data";
|
||||||
extra_config->load(exe_path + "/._sc_");
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (OS::get_singleton()->has_environment("APPDATA")) {
|
if (OS::get_singleton()->has_environment("APPDATA")) {
|
||||||
|
|||||||
Reference in New Issue
Block a user