Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix order of operations for macOS template check #84990

Merged
merged 1 commit into from Dec 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 3 additions & 9 deletions platform/macos/export/export_plugin.cpp
Expand Up @@ -2026,9 +2026,9 @@ Error EditorExportPlatformMacOS::export_project(const Ref<EditorExportPreset> &p

bool EditorExportPlatformMacOS::has_valid_export_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates, bool p_debug) const {
String err;
// Look for export templates (custom templates).
bool dvalid = false;
bool rvalid = false;
// Look for export templates (official templates first, then custom).
bool dvalid = exists_export_template("macos.zip", &err);
bool rvalid = dvalid; // Both in the same ZIP.

if (p_preset->get("custom_template/debug") != "") {
dvalid = FileAccess::exists(p_preset->get("custom_template/debug"));
Expand All @@ -2043,12 +2043,6 @@ bool EditorExportPlatformMacOS::has_valid_export_configuration(const Ref<EditorE
}
}

// Look for export templates (official templates, check only is custom templates are not set).
if (!dvalid || !rvalid) {
dvalid = exists_export_template("macos.zip", &err);
rvalid = dvalid; // Both in the same ZIP.
}

bool valid = dvalid || rvalid;
r_missing_templates = !valid;

Expand Down