Add has_extension() method to String

This commit is contained in:
kobewi
2025-08-08 17:56:19 +02:00
parent ca452113d4
commit a33ae0be0e
29 changed files with 46 additions and 48 deletions

View File

@@ -1511,7 +1511,7 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
// Just store it as it comes.
// Customization only happens if plugins did not take care of it before.
bool force_binary = convert_text_to_binary && (path.get_extension().to_lower() == "tres" || path.get_extension().to_lower() == "tscn");
bool force_binary = convert_text_to_binary && (path.has_extension("tres") || path.has_extension("tscn"));
String export_path = _export_customize(path, customize_resources_plugins, customize_scenes_plugins, export_cache, export_base_path, force_binary);
if (export_path != path) {