1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Cast dragged file extension name to lowercase, closes #68104

This commit is contained in:
Alfred Reinold Baudisch
2022-11-01 08:58:04 +01:00
parent c29fe310f1
commit 07e367cb0b
3 changed files with 10 additions and 6 deletions

View File

@@ -4129,11 +4129,13 @@ bool Node3DEditorViewport::can_drop_data_fw(const Point2 &p_point, const Variant
ResourceLoader::get_recognized_extensions_for_type("Texture", &texture_extensions);
for (int i = 0; i < files.size(); i++) {
String extension = files[i].get_extension().to_lower();
// Check if dragged files with mesh or scene extension can be created at least once.
if (mesh_extensions.find(files[i].get_extension()) ||
scene_extensions.find(files[i].get_extension()) ||
material_extensions.find(files[i].get_extension()) ||
texture_extensions.find(files[i].get_extension())) {
if (mesh_extensions.find(extension) ||
scene_extensions.find(extension) ||
material_extensions.find(extension) ||
texture_extensions.find(extension)) {
Ref<Resource> res = ResourceLoader::load(files[i]);
if (res.is_null()) {
continue;