Browse Source

Fix Set Animation Save Paths breaking on Windows

(cherry picked from commit 4d3319eceb9b9c69bd9211fb30bb1509db79f6d7)
AlexOtsuka 1 year ago
parent
commit
caf55eb072
1 changed files with 3 additions and 0 deletions
  1. 3 0
      editor/import/scene_import_settings.cpp

+ 3 - 0
editor/import/scene_import_settings.cpp

@@ -1085,6 +1085,7 @@ void SceneImportSettings::_save_dir_callback(const String &p_path) {
 						item->set_metadata(0, E.key);
 						item->set_editable(0, true);
 						item->set_checked(0, true);
+						name = name.validate_filename();
 						String path = p_path.path_join(name);
 						if (external_extension_type->get_selected() == 0) {
 							path += ".tres";
@@ -1138,6 +1139,7 @@ void SceneImportSettings::_save_dir_callback(const String &p_path) {
 						item->set_metadata(0, E.key);
 						item->set_editable(0, true);
 						item->set_checked(0, true);
+						name = name.validate_filename();
 						String path = p_path.path_join(name);
 						if (external_extension_type->get_selected() == 0) {
 							path += ".tres";
@@ -1190,6 +1192,7 @@ void SceneImportSettings::_save_dir_callback(const String &p_path) {
 					item->set_metadata(0, E.key);
 					item->set_editable(0, true);
 					item->set_checked(0, true);
+					name = name.validate_filename();
 					String path = p_path.path_join(name);
 					if (external_extension_type->get_selected() == 0) {
 						path += ".tres";