From 96f61b2d6557b89885188362a724f40564bbcfcb Mon Sep 17 00:00:00 2001 From: Felix Yang Date: Sun, 4 Mar 2018 10:47:08 +0100 Subject: [PATCH] Added a check for trailing dot when creating folder. Merge the trailing dot test into existing test. Removed OS test. --- editor/filesystem_dock.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index e26f4ba4496..417027395bf 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; }