mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Merge pull request #81075 from SekoiaTree/prevent-leading-dot
Prevent creating any type of file with a leading dot
This commit is contained in:
commit
119f379a3d
4 changed files with 19 additions and 4 deletions
|
@ -244,6 +244,9 @@ String ScriptCreateDialog::_validate_path(const String &p_path, bool p_file_must
|
|||
if (!p.get_file().get_basename().is_valid_filename()) {
|
||||
return TTR("Filename is invalid.");
|
||||
}
|
||||
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