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
This commit is contained in:
parent
b41b021674
commit
e6c579c624
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user