[Github-comments] [geany] Proxy plugins (#629)

Colomban Wendling notifications at xxxxx
Tue Sep 8 13:33:36 UTC 2015


> @@ -830,6 +1000,52 @@ static gboolean check_plugin_path(const gchar *fname)
>  }
>  
>  
> +/* Retuns NULL if this ain't a plugin,
> + * otherwise it returns the appropriate PluginProxy instance to load it */
> +static PluginProxy* is_plugin(const gchar *file)
> +{
> +	PluginProxy *proxy;
> +	const gchar *tmp;
> +	gint i;
> +
> +	/* extract file extension to avoid g_str_has_suffix() in the loop */
> +	tmp = (const gchar *)g_utf8_strrchr(file, -1, '.');
> +	if (tmp == NULL)
> +		return FALSE;
> +	/* ensure the dot is really part of the filename */
> +	else if (strchr(tmp, G_DIR_SEPARATOR) != NULL)

On Windows we probably also need to check `/`

---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/629/files#r38925148
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20150908/c3b2a62a/attachment.html>


More information about the Github-comments mailing list