1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-22 15:06:45 +00:00

Merge pull request #81075 from SekoiaTree/prevent-leading-dot

Prevent creating any type of file with a leading dot
This commit is contained in:
Rémi Verschelde
2023-09-08 09:10:59 +02:00
4 changed files with 19 additions and 4 deletions

View File

@@ -104,6 +104,8 @@ void SceneCreateDialog::update_dialog() {
if (validation_panel->is_valid() && !scene_name.is_valid_filename()) {
validation_panel->set_message(MSG_ID_PATH, TTR("File name invalid."), EditorValidationPanel::MSG_ERROR);
} else if (validation_panel->is_valid() && scene_name[0] == '.') {
validation_panel->set_message(MSG_ID_PATH, TTR("File name begins with a dot."), EditorValidationPanel::MSG_ERROR);
}
if (validation_panel->is_valid()) {