mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Prevent using name with leading dot when create/rename/duplicate scene/folder/script/resource
Fixes #62497
This commit is contained in:
parent
e22335ec72
commit
6782738a85
7 changed files with 47 additions and 6 deletions
|
@ -169,6 +169,9 @@ String ScriptCreateDialog::_validate_path(const String &p_path, bool p_file_must
|
|||
if (p.get_file().get_basename() == "") {
|
||||
return TTR("Filename is empty.");
|
||||
}
|
||||
if (p.get_file().begins_with(".")) {
|
||||
return TTR("Name begins with a dot.");
|
||||
}
|
||||
|
||||
p = ProjectSettings::get_singleton()->localize_path(p);
|
||||
if (!p.begins_with("res://")) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue