Kaydet (Commit) e6c579c6 authored tarafından Nick Treleaven's avatar Nick Treleaven

Fix optimization for filter check when pattern is '*'.

Use foreach_strv() instead of foreach_c_array().



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5662 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst b41b0216
......@@ -6,6 +6,9 @@
* plugins/filebrowser.c:
Fix applying default setting for hide_object_files (oops).
Fix warning when enabling plugin from the Plugin Manager.
* plugins/filebrowser.c:
Fix optimization for filter check when pattern is '*'.
Use foreach_strv() instead of foreach_c_array().
2011-03-30 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
......
......@@ -163,15 +163,13 @@ static gboolean check_hidden(const gchar *filename, const gchar *base_name)
static gboolean check_filtered(const gchar *base_name)
{
gchar **filter_item;
guint len;
if (filter == NULL)
return FALSE;
len = g_strv_length(filter);
foreach_c_array(filter_item, filter, len)
foreach_strv(filter_item, filter)
{
if (utils_str_equal(base_name, "*") || g_pattern_match_simple(*filter_item, base_name))
if (utils_str_equal(*filter_item, "*") || g_pattern_match_simple(*filter_item, base_name))
{
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