1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-19 14:31:59 +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

@@ -1797,6 +1797,11 @@ void EditorNode::_dialog_action(String p_file) {
case RESOURCE_SAVE:
case RESOURCE_SAVE_AS: {
ERR_FAIL_COND(saving_resource.is_null());
if (p_file.get_file().begins_with(".")) {
show_accept(TTR("Could not use a name with a leading dot."), TTR("OK"));
return;
}
save_resource_in_path(saving_resource, p_file);
saving_resource = Ref<Resource>();
ObjectID current = editor_history.get_current();