mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-10-20 21:04:15 -04:00
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).
This commit is contained in:
1 parent
591b908fbf
commit
6d7b3d52dc
1 file changed
+13
@@ -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]);
|
||||
|
||||
Reference in new issue
Block a user