You've already forked godot
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:
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user