aboutsummaryrefslogtreecommitdiff
path: root/editor/filesystem_dock.cpp
diff options
context:
space:
mode:
authorFelix Yang2018-03-04 10:47:08 +0100
committerHein-Pieter van Braam2018-03-28 23:50:29 +0200
commit12336dc25323fe30d50d3a3526c2b51984f91dd1 (patch)
tree52a6efbd5e61c90a964c0eaa43a3d0a570f86e06 /editor/filesystem_dock.cpp
parent8da76f3bb8e7d059d8c9337a441e50809e9358f9 (diff)
downloadgodot-12336dc25323fe30d50d3a3526c2b51984f91dd1.tar.gz
godot-12336dc25323fe30d50d3a3526c2b51984f91dd1.tar.zst
godot-12336dc25323fe30d50d3a3526c2b51984f91dd1.zip
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)
Diffstat (limited to 'editor/filesystem_dock.cpp')
-rw-r--r--editor/filesystem_dock.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp
index 4ac8311e7..97c76c842 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;
}