mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +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:
parent
031f6deefb
commit
bbeb2f98f5
4 changed files with 19 additions and 4 deletions
|
@ -243,6 +243,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