1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-30 23:06:38 +02:00

core, plugins: abort upgrade immediately if any upgrade file fails to be written

Detail of changes:

- the save of upgrade files in plugins is now done as soon as the "upgrade"
  signal is received, and not when the plugin is unloaded (it was too late to
  detect any problem and prevent the upgrade to happen)
- if the write of an upgrade file fails, the signal callback in plugin now
  returns WEECHAT_RC_ERROR and WeeChat checks this code to stop the upgrade as
  soon as this return code is received
- a new flag is added in plugin structure: unload_with_upgrade, it is set to 1
  before unloading all plugins when upgrade will happen (all *.upgrade files
  are then already successfully written).
This commit is contained in:
Sébastien Helleu
2024-11-24 10:07:05 +01:00
parent 244595d94f
commit 328aa8f202
26 changed files with 298 additions and 54 deletions
+1 -1
View File
@@ -199,7 +199,7 @@ irc_buffer_close_cb (const void *pointer, void *data,
IRC_SERVER_OPTION_AUTOJOIN_DYNAMIC)
&& ptr_server->is_connected
&& !irc_signal_quit_received
&& !irc_signal_upgrade_received)
&& !weechat_irc_plugin->unload_with_upgrade)
{
irc_join_remove_channel_from_autojoin (ptr_server,
ptr_channel->name);