diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-03-13 22:22:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-13 22:22:27 +0100 |
commit | 21aabc4fe365c5300ab0983405450c2f4d150991 (patch) | |
tree | 954bd99b8dbe30dd5b5c6053a95d8abc2f8d5d20 | |
parent | 0fd723d3ec1dc80d923f7e4e9062873916c762f0 (diff) | |
parent | c8538153b08c976f2a0aeba5c7385b8c8766fc62 (diff) |
Merge pull request #46969 from Pop0p/fix_folder_stripedges
Remove whitespaces when creating folder
-rw-r--r-- | editor/editor_file_dialog.cpp | 4 | ||||
-rw-r--r-- | scene/gui/file_dialog.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp index 6d694358bf..f78da9569f 100644 --- a/editor/editor_file_dialog.cpp +++ b/editor/editor_file_dialog.cpp @@ -1076,9 +1076,9 @@ EditorFileDialog::Access EditorFileDialog::get_access() const { } void EditorFileDialog::_make_dir_confirm() { - Error err = dir_access->make_dir(makedirname->get_text()); + Error err = dir_access->make_dir(makedirname->get_text().strip_edges()); if (err == OK) { - dir_access->change_dir(makedirname->get_text()); + dir_access->change_dir(makedirname->get_text().strip_edges()); invalidate(); update_filters(); update_dir(); diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp index 7453324505..7fb5113130 100644 --- a/scene/gui/file_dialog.cpp +++ b/scene/gui/file_dialog.cpp @@ -731,9 +731,9 @@ FileDialog::Access FileDialog::get_access() const { } void FileDialog::_make_dir_confirm() { - Error err = dir_access->make_dir(makedirname->get_text()); + Error err = dir_access->make_dir(makedirname->get_text().strip_edges()); if (err == OK) { - dir_access->change_dir(makedirname->get_text()); + dir_access->change_dir(makedirname->get_text().strip_edges()); invalidate(); update_filters(); update_dir(); |