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

script: only check if return value of plugin_script_search_path is NULL (issue #2019)

This commit is contained in:
Sébastien Helleu
2023-09-22 22:58:51 +02:00
parent 6c36836182
commit 2d9b133c77
+1 -9
View File
@@ -1151,16 +1151,8 @@ plugin_script_remove_file (struct t_weechat_plugin *weechat_plugin,
while (i < 2)
{
path_script = plugin_script_search_path (weechat_plugin, name, 0);
/*
* script not found? (if path_script == name, that means the function
* above did not find the script)
*/
if (!path_script || (strcmp (path_script, name) == 0))
{
if (path_script)
free (path_script);
if (!path_script)
break;
}
num_found++;
if (unlink (path_script) == 0)
{