Merge pull request #46969 from Pop0p/fix_folder_stripedges

Remove whitespaces when creating folder
This commit is contained in:
Rémi Verschelde 2021-03-13 22:22:27 +01:00 committed by GitHub
commit 21aabc4fe3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -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();

View File

@ -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();