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 <viachaslau.vinegret@outlook.com>
This commit is contained in:
Viachaslau Khalikin
2022-09-20 01:46:51 +03:00
parent cc7231a43b
commit 0ceb8c53c3

View File

@@ -7247,6 +7247,7 @@ cmd_plugins(ProfWin* window, const char* const command, gchar** args)
const gchar* filename; const gchar* filename;
cons_show("The following Python plugins are available globally and can be installed:"); cons_show("The following Python plugins are available globally and can be installed:");
while ((filename = g_dir_read_name(global_pyp_dir))) { while ((filename = g_dir_read_name(global_pyp_dir))) {
if (g_str_has_suffix(filename, ".py"))
cons_show(" %s", filename); cons_show(" %s", filename);
} }
} }
@@ -7254,6 +7255,7 @@ cmd_plugins(ProfWin* window, const char* const command, gchar** args)
const gchar* filename; const gchar* filename;
cons_show("The following C plugins are available globally and can be installed:"); cons_show("The following C plugins are available globally and can be installed:");
while ((filename = g_dir_read_name(global_cp_dir))) { while ((filename = g_dir_read_name(global_cp_dir))) {
if (g_str_has_suffix(filename, ".so"))
cons_show(" %s", filename); cons_show(" %s", filename);
} }
} }