From 0ceb8c53c314734c4db4231f47397f228da77081 Mon Sep 17 00:00:00 2001 From: Viachaslau Khalikin Date: Tue, 20 Sep 2022 01:46:51 +0300 Subject: [PATCH] fix: filtering of the available global plugins For command /plugins : Don't print files that do not correspond to the plugins design Signed-off-by: Viachaslau Khalikin --- src/command/cmd_funcs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index 16d4d4c0..10f64d54 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -7247,14 +7247,16 @@ cmd_plugins(ProfWin* window, const char* const command, gchar** args) const gchar* filename; cons_show("The following Python plugins are available globally and can be installed:"); while ((filename = g_dir_read_name(global_pyp_dir))) { - cons_show(" %s", filename); + if (g_str_has_suffix(filename, ".py")) + cons_show(" %s", filename); } } if (global_cp_dir) { const gchar* filename; cons_show("The following C plugins are available globally and can be installed:"); while ((filename = g_dir_read_name(global_cp_dir))) { - cons_show(" %s", filename); + if (g_str_has_suffix(filename, ".so")) + cons_show(" %s", filename); } }