summaryrefslogtreecommitdiffstats
path: root/editor/editor_file_system.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_file_system.cpp')
-rw-r--r--editor/editor_file_system.cpp29
1 files changed, 25 insertions, 4 deletions
diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp
index 516b8f3d74..14190a43a5 100644
--- a/editor/editor_file_system.cpp
+++ b/editor/editor_file_system.cpp
@@ -1367,6 +1367,10 @@ bool EditorFileSystem::_find_file(const String &p_file, EditorFileSystemDirector
String f = ProjectSettings::get_singleton()->localize_path(p_file);
+ // Note: Only checks if base directory is case sensitive.
+ Ref<DirAccess> dir = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
+ bool fs_case_sensitive = dir->is_case_sensitive("res://");
+
if (!f.begins_with("res://")) {
return false;
}
@@ -1390,9 +1394,16 @@ bool EditorFileSystem::_find_file(const String &p_file, EditorFileSystemDirector
int idx = -1;
for (int j = 0; j < fs->get_subdir_count(); j++) {
- if (fs->get_subdir(j)->get_name() == path[i]) {
- idx = j;
- break;
+ if (fs_case_sensitive) {
+ if (fs->get_subdir(j)->get_name() == path[i]) {
+ idx = j;
+ break;
+ }
+ } else {
+ if (fs->get_subdir(j)->get_name().to_lower() == path[i].to_lower()) {
+ idx = j;
+ break;
+ }
}
}
@@ -1653,8 +1664,13 @@ void EditorFileSystem::_queue_update_script_class(const String &p_path) {
}
void EditorFileSystem::_update_scene_groups() {
- update_scene_mutex.lock();
+ EditorProgress *ep = nullptr;
+ if (update_scene_paths.size() > 1) {
+ ep = memnew(EditorProgress("update_scene_groups", TTR("Update Scene Groups"), update_scene_paths.size()));
+ }
+ int step_count = 0;
+ update_scene_mutex.lock();
for (const String &path : update_scene_paths) {
ProjectSettings::get_singleton()->remove_scene_groups_cache(path);
@@ -1670,8 +1686,13 @@ void EditorFileSystem::_update_scene_groups() {
if (!scene_groups.is_empty()) {
ProjectSettings::get_singleton()->add_scene_groups_cache(path, scene_groups);
}
+
+ if (ep) {
+ ep->step(TTR("Updating Scene Groups..."), step_count++);
+ }
}
+ memdelete_notnull(ep);
update_scene_paths.clear();
update_scene_mutex.unlock();