diff options
author | Felix Yang <felixyang117+GitHub@hotmail.com> | 2018-03-04 10:47:08 +0100 |
---|---|---|
committer | Felix Yang <felixyang117+GitHub@hotmail.com> | 2018-03-07 11:11:19 +0100 |
commit | 96f61b2d6557b89885188362a724f40564bbcfcb (patch) | |
tree | 8609b4f7bdad2c80e4659aa29f5ee6b5ed2503f3 /editor | |
parent | 4fa8987494c213bf85fbadaf394d844874544990 (diff) |
Added a check for trailing dot when creating folder.
Merge the trailing dot test into existing test. Removed OS test.
Diffstat (limited to 'editor')
-rw-r--r-- | editor/filesystem_dock.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index e26f4ba449..417027395b 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -918,7 +918,7 @@ 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) { + } 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")); return; } |