summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-03-05 22:55:16 +0100
committerGitHub <noreply@github.com>2019-03-05 22:55:16 +0100
commit2e79ec973f7e28de7ed550fe74f170c92d9dc298 (patch)
tree49276ca12a464bda28adc20aec2f8e97e2e21b65 /editor
parent88355b2719fe7a103e6da82c1f58361190f2e1f1 (diff)
parent3fdbdd838074b3f6b78e6f6c2fae1f3a407c2446 (diff)
Merge pull request #26626 from rluders/misleading-error-message-export
Fixing misleading error message when trying to export
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_export.cpp4
-rw-r--r--editor/project_export.cpp6
2 files changed, 9 insertions, 1 deletions
diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp
index 75708431ec..249bbb2a39 100644
--- a/editor/editor_export.cpp
+++ b/editor/editor_export.cpp
@@ -1456,6 +1456,10 @@ List<String> EditorExportPlatformPC::get_binary_extensions(const Ref<EditorExpor
Error EditorExportPlatformPC::export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags) {
ExportNotifier notifier(*this, p_preset, p_debug, p_path, p_flags);
+ if (!FileAccess::exists(p_path.get_base_dir())) {
+ return ERR_FILE_BAD_PATH;
+ }
+
String custom_debug = p_preset->get("custom_template/debug");
String custom_release = p_preset->get("custom_template/release");
diff --git a/editor/project_export.cpp b/editor/project_export.cpp
index 831ebde3a6..82a6a07805 100644
--- a/editor/project_export.cpp
+++ b/editor/project_export.cpp
@@ -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");