Take correct part of extension with File Dialog

Fixes #36697

(cherry picked from commit 319840bad1)
This commit is contained in:
Dominik 'dreamsComeTrue' Jasiński 2020-03-01 09:44:48 +01:00 committed by Rémi Verschelde
parent 88f0cd0b27
commit a2bc4f0b30
1 changed files with 1 additions and 1 deletions

View File

@ -691,7 +691,7 @@ void EditorFileDialog::update_file_name() {
String base_name = file_str.get_basename(); String base_name = file_str.get_basename();
Vector<String> filter_substr = filter_str.split(";"); Vector<String> filter_substr = filter_str.split(";");
if (filter_substr.size() >= 2) { if (filter_substr.size() >= 2) {
file_str = base_name + "." + filter_substr[1].strip_edges().to_lower(); file_str = base_name + "." + filter_substr[0].strip_edges().lstrip("*.").to_lower();
} else { } else {
file_str = base_name + "." + filter_str.get_extension().strip_edges().to_lower(); file_str = base_name + "." + filter_str.get_extension().strip_edges().to_lower();
} }