From 35712b75b589d0f40386891fa6e2cf1c4d97cf6e Mon Sep 17 00:00:00 2001 From: jgeboski Date: Sun, 15 May 2016 18:22:13 -0400 Subject: Only load plugins with the right file extension Plugins which use autotools will install a .la file along with the .so file. Both of these files are loadable as plugins, so the plugin ends up being loaded twice. To prevent this, only load the .so module. --- protocols/nogaim.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/protocols/nogaim.c b/protocols/nogaim.c index c902258a..ab11508b 100644 --- a/protocols/nogaim.c +++ b/protocols/nogaim.c @@ -132,6 +132,10 @@ void load_plugins(void) char *path; while ((entry = g_dir_read_name(dir))) { + if (!g_str_has_suffix(entry, "." G_MODULE_SUFFIX)) { + continue; + } + path = g_build_filename(global.conf->plugindir, entry, NULL); if (!path) { log_message(LOGLVL_WARNING, "Can't build path for %s\n", entry); -- cgit v1.2.3