Export: Propagate save_zip error to callers

This commit is contained in:
Miguel de Icaza 2024-12-09 16:56:16 -05:00 committed by Rémi Verschelde
parent 8dcf5b4eaf
commit e9cf0e0e18
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -2234,6 +2234,8 @@ Error EditorExportPlatform::save_zip(const Ref<EditorExportPreset> &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<EditorExportPreset> &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;