Merge pull request #26626 from rluders/misleading-error-message-export

Fixing misleading error message when trying to export
This commit is contained in:
Rémi Verschelde 2019-03-05 22:55:16 +01:00 committed by GitHub
commit 2e79ec973f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 29 additions and 1 deletions

View file

@ -211,6 +211,10 @@ Error EditorExportPlatformJavaScript::export_project(const Ref<EditorExportPrese
template_path = find_export_template(EXPORT_TEMPLATE_WEBASSEMBLY_RELEASE);
}
if (!FileAccess::exists(p_path.get_base_dir())) {
return ERR_FILE_BAD_PATH;
}
if (template_path != String() && !FileAccess::exists(template_path)) {
EditorNode::get_singleton()->show_warning(TTR("Template file not found:") + "\n" + template_path);
return ERR_FILE_NOT_FOUND;