summaryrefslogtreecommitdiff
path: root/batch.c
diff options
context:
space:
mode:
authorMatt McCutchen <matt@mattmccutchen.net>2009-05-23 10:59:14 -0700
committerWayne Davison <wayned@samba.org>2009-05-23 11:20:40 -0700
commitc8fa85b23bfebc68f0ab2e0464937f5ee4a8bf69 (patch)
treeae6861995306bbd3fd94584e7555f38b73b4fcb5 /batch.c
parenta61ec6b1688ea64fba7c03d69d6f75a7e0b24c61 (diff)
downloadrsync-c8fa85b23bfebc68f0ab2e0464937f5ee4a8bf69.tar.gz
Refactorings to the filter code, most notably:
- Improve function name: parse_rule -> parse_filter_str (to make the similarity with parse_filter_file clearer, and better indicate that it can parse multiple rules when FILTRULE_WORD_SPLIT is specified). - In preparation for rule prefixes containing information beyond the rflags, change the code to pass around a full "template" filter_rule instead of just rflags. Callers of parse_filter_{str,file} that want to specify only rflags can use rule_template(rflags) . - Remove the MODIFIERS_* strings and instead hand-code the condition under which each modifier is valid. This should make it easier to see that the conditions are correct. - Tighten up default modifiers on merge rules: - Disallow "!" because it isn't useful. - If the merge rule specifies a side via "s" or "r", the rules in the file cannot also specify a side via "s", "r", "hide", etc. [Patch was changed by Wayne a bit prior to application.]
Diffstat (limited to 'batch.c')
-rw-r--r--batch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/batch.c b/batch.c
index 99b84eac..b63f0c54 100644
--- a/batch.c
+++ b/batch.c
@@ -196,7 +196,7 @@ static void write_filter_rules(int fd)
write_sbuf(fd, " <<'#E#'\n");
for (ent = filter_list.head; ent; ent = ent->next) {
unsigned int plen;
- char *p = get_rule_prefix(ent->rflags, "- ", 0, &plen);
+ char *p = get_rule_prefix(ent, "- ", 0, &plen);
write_buf(fd, p, plen);
write_sbuf(fd, ent->pattern);
if (ent->rflags & FILTRULE_DIRECTORY)