Fixes misleading error message when trying to export
This patch fixes the misleading error message when users try to "export all" into an invalid destination path. Closes #26539
This commit is contained in:
parent
9dd9737cb4
commit
3fdbdd8380
7 changed files with 29 additions and 1 deletions
|
|
@ -1012,7 +1012,11 @@ void ProjectExportDialog::_export_all(bool p_debug) {
|
|||
|
||||
Error err = platform->export_project(preset, p_debug, preset->get_export_path(), 0);
|
||||
if (err != OK) {
|
||||
error_dialog->set_text(TTR("Export templates for this platform are missing/corrupted:") + " " + platform->get_name());
|
||||
if (err == ERR_FILE_BAD_PATH) {
|
||||
error_dialog->set_text(TTR("The given export path doesn't exist:") + "\n" + preset->get_export_path().get_base_dir());
|
||||
} else {
|
||||
error_dialog->set_text(TTR("Export templates for this platform are missing/corrupted:") + " " + platform->get_name());
|
||||
}
|
||||
error_dialog->show();
|
||||
error_dialog->popup_centered_minsize(Size2(300, 80));
|
||||
ERR_PRINT("Failed to export project");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue