Kaydet (Commit) 1f2aa9d9 authored tarafından Enrico Tröger's avatar Enrico Tröger

Prevent loading the same plugin in different paths.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1770 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst 6c36b8dc
......@@ -2,6 +2,7 @@
* configure.in: Fix error in "make install" caused by old automake
versions and intltool.
* src/plugins.c: Prevent loading the same plugin in different paths.
2007-08-03 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
......
......@@ -161,16 +161,24 @@ geany_data_init()
static gboolean
plugin_loaded(GModule *module)
{
const gchar *fname = g_module_name(module);
gchar *basename_module, *basename_loaded;
GList *item;
basename_module = g_path_get_basename(g_module_name(module));
for (item = plugin_list; item != NULL; item = g_list_next(item))
{
Plugin *p = item->data;
basename_loaded = g_path_get_basename(
g_module_name(((Plugin*)item->data)->module));
if (utils_str_equal(fname, g_module_name(p->module)))
if (utils_str_equal(basename_module, basename_loaded))
{
g_free(basename_loaded);
g_free(basename_module);
return TRUE;
}
g_free(basename_loaded);
}
g_free(basename_module);
return FALSE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment