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

Prevent using name with leading dot when create/rename/duplicate scene/folder/script/resource

Fixes #62497
This commit is contained in:
James
2022-07-12 15:51:18 +08:00
parent e22335ec72
commit 6782738a85
7 changed files with 47 additions and 6 deletions

View File

@@ -110,6 +110,11 @@ void SceneCreateDialog::update_dialog(Variant p_discard) {
is_valid = false;
}
if (is_valid && scene_name[0] == '.') {
update_error(file_error_label, MSG_ERROR, TTR("File name begins with a dot."));
is_valid = false;
}
if (is_valid) {
scene_name = directory.plus_file(scene_name);
DirAccessRef da = DirAccess::create(DirAccess::ACCESS_RESOURCES);