Merge pull request #17243 from delftswa2018/trailingDotFix
Fix being able to create folder name with ending '.' on Windows
This commit is contained in:
commit
900384a622
|
@ -918,7 +918,7 @@ void FileSystemDock::_make_dir_confirm() {
|
||||||
if (dir_name.length() == 0) {
|
if (dir_name.length() == 0) {
|
||||||
EditorNode::get_singleton()->show_warning(TTR("No name provided"));
|
EditorNode::get_singleton()->show_warning(TTR("No name provided"));
|
||||||
return;
|
return;
|
||||||
} else if (dir_name.find("/") != -1 || dir_name.find("\\") != -1 || dir_name.find(":") != -1) {
|
} else if (dir_name.find("/") != -1 || dir_name.find("\\") != -1 || dir_name.find(":") != -1 || dir_name.ends_with(".")) {
|
||||||
EditorNode::get_singleton()->show_warning(TTR("Provided name contains invalid characters"));
|
EditorNode::get_singleton()->show_warning(TTR("Provided name contains invalid characters"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue