diff options
author | jgeboski <jgeboski@gmail.com> | 2016-05-15 18:22:13 -0400 |
---|---|---|
committer | jgeboski <jgeboski@gmail.com> | 2016-05-25 22:48:08 -0400 |
commit | 35712b75b589d0f40386891fa6e2cf1c4d97cf6e (patch) | |
tree | 62f0d2bef6e77bba643c54cdd4451d6ed77dc75d | |
parent | 808825eda6d90aeabd754f70eee52e2b0165749e (diff) |
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.
-rw-r--r-- | protocols/nogaim.c | 4 |
1 files changed, 4 insertions, 0 deletions
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); |