From e9cf0e0e1864c4933be519e84872ae2c3f2e5516 Mon Sep 17 00:00:00 2001 From: Miguel de Icaza Date: Mon, 9 Dec 2024 16:56:16 -0500 Subject: [PATCH] Export: Propagate `save_zip` error to callers --- editor/export/editor_export_platform.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/editor/export/editor_export_platform.cpp b/editor/export/editor_export_platform.cpp index ee4eb922dd..227ce5da8d 100644 --- a/editor/export/editor_export_platform.cpp +++ b/editor/export/editor_export_platform.cpp @@ -2234,6 +2234,8 @@ Error EditorExportPlatform::save_zip(const Ref &p_preset, bo Error err = export_project_files(p_preset, p_debug, p_save_func, nullptr, &zd, _zip_add_shared_object); if (err != OK && err != ERR_SKIP) { add_message(EXPORT_MESSAGE_ERROR, TTR("Save ZIP"), TTR("Failed to export project files.")); + zipClose(zip, nullptr); + return err; } zipClose(zip, nullptr); @@ -2250,6 +2252,7 @@ Error EditorExportPlatform::save_zip(const Ref &p_preset, bo if (err != OK) { da->remove(tmppath); add_message(EXPORT_MESSAGE_ERROR, TTR("Save ZIP"), vformat(TTR("Failed to move temporary file \"%s\" to \"%s\"."), tmppath, p_path)); + return err; } return OK;