aboutsummaryrefslogtreecommitdiffstats
path: root/exclude.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2005-02-19 03:12:21 +0000
committerWayne Davison <wayned@samba.org>2005-02-19 03:12:21 +0000
commit6d7b3d52dc3a9caa73e765b60994b9781643753b (patch)
tree5cbfd02ea0085af58707d78b2cf7bcb1bed624a5 /exclude.c
parent591b908fbf4f817bf0b799c250dc2a47ddef0d1d (diff)
downloadandroid_external_rsync-6d7b3d52dc3a9caa73e765b60994b9781643753b.tar.gz
android_external_rsync-6d7b3d52dc3a9caa73e765b60994b9781643753b.tar.bz2
android_external_rsync-6d7b3d52dc3a9caa73e765b60994b9781643753b.zip
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).
Diffstat (limited to 'exclude.c')
-rw-r--r--exclude.c13
1 files changed, 13 insertions, 0 deletions
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]);