From 6d7b3d52dc3a9caa73e765b60994b9781643753b Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Sat, 19 Feb 2005 03:12:21 +0000 Subject: [PATCH] Rules read in from per-dir merge files need to have non-applicable rules filtered out before the rule gets stored (not in a post- filtering pass like the rules that are read-in prior to the run). --- exclude.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/exclude.c b/exclude.c index 9a7a81c3..94556098 100644 --- a/exclude.c +++ b/exclude.c @@ -133,6 +133,19 @@ static void add_rule(struct filter_list_struct *listp, const char *pat, listp->debug_type); } + /* This flag also indicates that we're reading a list that + * needs to be filtered now, not post-filtered later. */ + if (xflags & XFLG_ANCHORED2ABS) { + uint32 mf = mflags & (MATCHFLG_RECEIVER_SIDE|MATCHFLG_SENDER_SIDE); + if (am_sender) { + if (mf == MATCHFLG_RECEIVER_SIDE) + return; + } else { + if (mf == MATCHFLG_SENDER_SIDE) + return; + } + } + if (!(ret = new(struct filter_struct))) out_of_memory("add_rule"); memset(ret, 0, sizeof ret[0]); -- 2.34.1