From d3735d8b21894e86284091a256a61c15fef8a89c Mon Sep 17 00:00:00 2001 From: Alfred Reinold Baudisch Date: Tue, 1 Nov 2022 08:58:04 +0100 Subject: [PATCH] Cast dragged file extension name to lowercase, closes #68104 (cherry picked from commit 07e367cb0b07f02fef92420fde53e05be3d4b247) --- editor/editor_node.cpp | 2 +- editor/plugins/spatial_editor_plugin.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 88eb1469ec6..ebc078eb5f1 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -3834,7 +3834,7 @@ void EditorNode::_quick_opened() { List scene_extensions; ResourceLoader::get_recognized_extensions_for_type("PackedScene", &scene_extensions); - if (open_scene_dialog || scene_extensions.find(files[i].get_extension())) { + if (open_scene_dialog || scene_extensions.find(files[i].get_extension().to_lower())) { open_request(res_path); } else { load_resource(res_path); diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index 27ea0652cb1..444203b97cb 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -4151,7 +4151,8 @@ bool SpatialEditorViewport::can_drop_data_fw(const Point2 &p_point, const Varian ResourceLoader::get_recognized_extensions_for_type("Mesh", &mesh_extensions); for (int i = 0; i < files.size(); i++) { - if (mesh_extensions.find(files[i].get_extension()) || scene_extensions.find(files[i].get_extension())) { + String extension = files[i].get_extension().to_lower(); + if (mesh_extensions.find(extension) || scene_extensions.find(extension)) { RES res = ResourceLoader::load(files[i]); if (res.is_null()) { continue;