From 12336dc25323fe30d50d3a3526c2b51984f91dd1 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. (cherry picked from commit 96f61b2d6557b89885188362a724f40564bbcfcb) --- 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 4ac8311e7fa..97c76c84238 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -917,7 +917,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; }