diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2009-10-03 10:25:13 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2009-10-03 10:25:13 +0200 |
commit | 427419dcd03110105a6eaff863a07c3610af25eb (patch) | |
tree | 8c2c99d5002a3f108e06f0a06987a5dc3265daab /src | |
parent | 9116131fdef2554ac3f1f15199020af5ed15a004 (diff) | |
download | weechat-427419dcd03110105a6eaff863a07c3610af25eb.zip |
Fix restore of hotlist after /upgrade
Diffstat (limited to 'src')
-rw-r--r-- | src/core/wee-upgrade.c | 2 | ||||
-rw-r--r-- | src/gui/gui-buffer.c | 16 |
2 files changed, 13 insertions, 5 deletions
diff --git a/src/core/wee-upgrade.c b/src/core/wee-upgrade.c index e9933230e..3bf0e8871 100644 --- a/src/core/wee-upgrade.c +++ b/src/core/wee-upgrade.c @@ -542,7 +542,7 @@ upgrade_weechat_read_cb (void *data, hotlist_reset = 1; } plugin_name = infolist_string (infolist, "plugin_name"); - buffer_name = infolist_string (infolist, "plugin_name"); + buffer_name = infolist_string (infolist, "buffer_name"); if (plugin_name && buffer_name) { ptr_buffer = gui_buffer_search_by_name (plugin_name, diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c index b606b84fb..1428048f3 100644 --- a/src/gui/gui-buffer.c +++ b/src/gui/gui-buffer.c @@ -1210,15 +1210,23 @@ gui_buffer_search_by_name (const char *plugin, const char *name) plugin_match = 1; if (plugin && plugin[0]) { - if (ptr_buffer->plugin) + if (ptr_buffer->plugin_name_for_upgrade) { - if (strcmp (plugin, ptr_buffer->plugin->name) != 0) + if (strcmp (plugin, ptr_buffer->plugin_name_for_upgrade) != 0) plugin_match = 0; } else { - if (strcmp (plugin, PLUGIN_CORE) != 0) - plugin_match = 0; + if (ptr_buffer->plugin) + { + if (strcmp (plugin, ptr_buffer->plugin->name) != 0) + plugin_match = 0; + } + else + { + if (strcmp (plugin, PLUGIN_CORE) != 0) + plugin_match = 0; + } } } if (plugin_match && (strcmp (ptr_buffer->name, name) == 0)) |