1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-15 13:51:40 +00:00

Prevent creating any type of file with a leading dot

Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Co-authored-by: gotnospirit <gotnospirit@gmail.com>
This commit is contained in:
sekoia
2023-08-28 15:27:00 +02:00
parent 031f6deefb
commit bbeb2f98f5
4 changed files with 19 additions and 4 deletions

View File

@@ -103,6 +103,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()) {