Merge pull request #23122 from Alien1993/enhance_folder_creation_error_message

Enhanced error message on folder creation with invalid chars on Windows
This commit is contained in:
Rémi Verschelde 2018-10-19 11:18:03 +02:00 committed by GitHub
commit 35450e56bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1217,7 +1217,8 @@ void FileSystemDock::_make_dir_confirm() {
if (dir_name.length() == 0) {
EditorNode::get_singleton()->show_warning(TTR("No name provided"));
return;
} else if (dir_name.find("/") != -1 || dir_name.find("\\") != -1 || dir_name.find(":") != -1 || dir_name.ends_with(".") || dir_name.ends_with(" ")) {
} else if (dir_name.find("/") != -1 || dir_name.find("\\") != -1 || dir_name.find(":") != -1 || dir_name.find("*") != -1 ||
dir_name.find("|") != -1 || dir_name.find(">") != -1 || dir_name.ends_with(".") || dir_name.ends_with(" ")) {
EditorNode::get_singleton()->show_warning(TTR("Provided name contains invalid characters"));
return;
}