Revision: 1770 http://geany.svn.sourceforge.net/geany/?rev=1770&view=rev Author: eht16 Date: 2007-08-04 09:25:13 -0700 (Sat, 04 Aug 2007)
Log Message: ----------- Prevent loading the same plugin in different paths.
Modified Paths: -------------- trunk/ChangeLog trunk/src/plugins.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2007-08-04 08:33:56 UTC (rev 1769) +++ trunk/ChangeLog 2007-08-04 16:25:13 UTC (rev 1770) @@ -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>
Modified: trunk/src/plugins.c =================================================================== --- trunk/src/plugins.c 2007-08-04 08:33:56 UTC (rev 1769) +++ trunk/src/plugins.c 2007-08-04 16:25:13 UTC (rev 1770) @@ -161,16 +161,24 @@ 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; }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.