Discussion:
[PATCH] lib.c: do not consider live filter when doing lib_for_each()
Johannes Weißl
2011-04-04 20:06:50 UTC
Permalink
lib_for_each_filtered() is used for dumping the filtered library. Since
live filtering is only a form of searching, it should not be considered.
---
lib.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib.c b/lib.c
index 1367731..41b7efa 100644
--- a/lib.c
+++ b/lib.c
@@ -665,7 +665,7 @@ static int do_lib_for_each(int (*cb)(void *data, struct track_info *ti), void *d
size *= 2;
tis = xrenew(struct track_info *, tis, size);
}
- if (!filtered || !is_filtered(e->ti))
+ if (!filtered || !filter || expr_eval(filter, e->ti))
tis[count++] = e->ti;
e = e->next;
}
--
1.7.4.1
Gregory Petrosyan
2011-04-05 21:05:46 UTC
Permalink
Post by Johannes Weißl
- if (!filtered || !is_filtered(e->ti))
+ if (!filtered || !filter || expr_eval(filter, e->ti))
Merged to master, thanks!

Gregory

Loading...