diff options
author | Spartan322 <Megacake1234@gmail.com> | 2024-10-22 06:56:34 -0400 |
---|---|---|
committer | Spartan322 <Megacake1234@gmail.com> | 2024-10-22 06:56:34 -0400 |
commit | 9a93ab2506a3544bf48ef1c2b2d7e3d6f0dffedb (patch) | |
tree | 961ebbb6fed86a794ff4446a848a359a6cd3fd4e /editor/gui | |
parent | 9a49cab65c8e8ed8ac5f0613d96ddde403d12728 (diff) | |
parent | b3bcb2dc14691f7729984128dca26a844f662fa1 (diff) | |
download | redot-engine-9a93ab2506a3544bf48ef1c2b2d7e3d6f0dffedb.tar.gz |
Merge commit godotengine/godot@b3bcb2dc14691f7729984128dca26a844f662fa1
Diffstat (limited to 'editor/gui')
-rw-r--r-- | editor/gui/editor_file_dialog.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/editor/gui/editor_file_dialog.cpp b/editor/gui/editor_file_dialog.cpp index 190b2d812c..61acb14cb5 100644 --- a/editor/gui/editor_file_dialog.cpp +++ b/editor/gui/editor_file_dialog.cpp @@ -1357,6 +1357,13 @@ EditorFileDialog::Access EditorFileDialog::get_access() const { void EditorFileDialog::_make_dir_confirm() { const String stripped_dirname = makedirname->get_text().strip_edges(); + if (stripped_dirname.is_empty()) { + error_dialog->set_text(TTR("The path specified is invalid.")); + error_dialog->popup_centered(Size2(250, 50) * EDSCALE); + makedirname->set_text(""); // Reset label. + return; + } + if (dir_access->dir_exists(stripped_dirname)) { error_dialog->set_text(TTR("Could not create folder. File with that name already exists.")); error_dialog->popup_centered(Size2(250, 50) * EDSCALE); |